ipcctl_pre_down_nolock — retrieve an ipc and check permissions for some IPC_XXX cmd
|struct ipc_namespace * ns,|
|struct ipc_ids * ids,|
|struct ipc64_perm * perm,|
struct ipc_namespace * ns
struct ipc_ids * ids
the table of ids where to look for the ipc
the id of the ipc to retrieve
the cmd to check
struct ipc64_perm * perm
the permission to set
one extra permission parameter used by msq
This function does some common audit and permissions check for some IPC_XXX cmd and is called from semctl_down, shmctl_down and msgctl_down. It must be called without any lock held and - retrieves the ipc with the given id in the given table. - performs some audit and permission check, depending on the given cmd - returns a pointer to the ipc object or otherwise, the corresponding error.
Call holding the both the rwsem and the rcu read lock.