---
name: "ipcctl_pre_down_nolock"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/ipcctl_pre_down_nolock"
---

# ipcctl\_pre\_down\_nolock(9)

retrieve an ipc and check permissions for some IPC\_XXX cmd

## NAME

ipcctl\_pre\_down\_nolock - retrieve an ipc and check permissions for some IPC\_XXX cmd

## SYNOPSIS

**struct kern\_ipc\_perm \* ipcctl\_pre\_down\_nolock(struct ipc\_namespace \*** *ns***, struct ipc\_ids \*** *ids***, int** *id***, int** *cmd***, struct ipc64\_perm \*** *perm***, int** *extra\_perm***);**

## ARGUMENTS

*ns*

ipc namespace

*ids*

the table of ids where to look for the ipc

*id*

the id of the ipc to retrieve

*cmd*

the cmd to check

*perm*

the permission to set

*extra\_perm*

one extra permission parameter used by msq

## DESCRIPTION

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.

## COPYRIGHT
