Changeset c25a39e in mainline for kernel/generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2018-03-13T18:01:47Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
70327bb
Parents:
cdc4334
git-author:
Jakub Jermar <jakub@…> (2018-02-20 22:33:58)
git-committer:
Jakub Jermar <jakub@…> (2018-03-13 18:01:47)
Message:

Destroy the phone capability on hangup

The capability must be destroyed at the time of the hangup otherwise the
phone would linger in the hungup state until the task is destroyed.

File:
1 edited

Legend:

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

    rcdc4334 rc25a39e  
    724724sys_errno_t sys_ipc_hangup(sysarg_t handle)
    725725{
    726         kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     726        kobject_t *kobj = cap_unpublish(TASK, handle, KOBJECT_TYPE_PHONE);
    727727        if (!kobj)
    728728                return ENOENT;
     
    730730        errno_t rc = ipc_phone_hangup(kobj->phone);
    731731        kobject_put(kobj);
     732        cap_free(TASK, handle);
    732733        return rc;
    733734}
Note: See TracChangeset for help on using the changeset viewer.