Changeset 6caf5fb in mainline for kernel/generic/src/ipc/ipcrsc.c


Ignore:
Timestamp:
2025-01-16T21:42:15Z (21 hours ago)
Author:
GitHub <noreply@…>
Parents:
e0e2264 (diff), 455241b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 21:42:15)
git-committer:
GitHub <noreply@…> (2025-01-16 21:42:15)
Message:

Merge 455241b37bedd3719ed3b5b025fdf26f44fd565b into e0e22648f5799cc98671695e153b0b00037daeb9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipcrsc.c

    re0e2264 r6caf5fb  
    4444#include <stdlib.h>
    4545
    46 static void phone_destroy(void *arg)
     46static void phone_destroy(kobject_t *arg)
    4747{
    48         phone_t *phone = (phone_t *) arg;
     48        phone_t *phone = phone_from_kobject(arg);
    4949        if (phone->hangup_call)
    50                 kobject_put(phone->hangup_call->kobject);
     50                kobject_put(&phone->hangup_call->kobject);
    5151        slab_free(phone_cache, phone);
    5252}
     
    7676                        return ENOMEM;
    7777                }
    78                 kobject_t *kobj = kobject_alloc(FRAME_ATOMIC);
    79                 if (!kobj) {
    80                         cap_free(TASK, handle);
    81                         slab_free(phone_cache, phone);
    82                         return ENOMEM;
    83                 }
     78
    8479                call_t *hcall = ipc_call_alloc();
    8580                if (!hcall) {
    8681                        cap_free(TASK, handle);
    8782                        slab_free(phone_cache, phone);
    88                         free(kobj);
    8983                        return ENOMEM;
    9084                }
     
    9488                phone->hangup_call = hcall;
    9589
    96                 kobject_initialize(kobj, KOBJECT_TYPE_PHONE, phone);
    97                 phone->kobject = kobj;
    98 
    9990                if (publish)
    100                         cap_publish(task, handle, kobj);
     91                        cap_publish(task, handle, &phone->kobject);
    10192
    10293                *phandle = handle;
    10394                if (kobject)
    104                         *kobject = kobj;
     95                        *kobject = &phone->kobject;
    10596        }
    10697        return rc;
Note: See TracChangeset for help on using the changeset viewer.