Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 96258fc in mainline


Ignore:
Timestamp:
2017-11-25T19:20:56Z (4 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
9940ce0
Parents:
ce4a21a0
Message:

Free up all call capabilities when task exits

File:
1 edited

Legend:

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

    rce4a21a0 r96258fc  
    838838}
    839839
     840static bool call_cap_cleanup_cb(cap_t *cap, void *arg)
     841{
     842        /*
     843         * Here we just free the capability and release the kobject.
     844         * The kernel answers the remaining calls elsewhere in ipc_cleanup().
     845         */
     846        kobject_t *kobj = cap_unpublish(cap->task, cap->handle,
     847            KOBJECT_TYPE_CALL);
     848        kobject_put(kobj);
     849        cap_free(cap->task, cap->handle);
     850        return true;
     851}
     852
    840853/** Clean up all IPC communication of the current task.
    841854 *
     
    874887        ipc_kbox_cleanup();
    875888#endif
     889
     890        /* Destroy all call capabilities */
     891        caps_apply_to_kobject_type(TASK, KOBJECT_TYPE_CALL, call_cap_cleanup_cb,
     892            NULL);
    876893       
    877894        /* Answer all messages in 'calls' and 'dispatched_calls' queues */
Note: See TracChangeset for help on using the changeset viewer.