'\" t .\" Title: ipcctl_pre_down_nolock .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: June 2017 .\" Manual: Kernel IPC facilities .\" Source: Kernel Hackers Manual 4.11.3 .\" Language: English .\" .TH "IPCCTL_PRE_DOWN_NOLO" "9" "June 2017" "Kernel Hackers Manual 4\&.11\&" "Kernel IPC facilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ipcctl_pre_down_nolock \- retrieve an ipc and check permissions for some IPC_XXX cmd .SH "SYNOPSIS" .HP \w'struct\ kern_ipc_perm\ *\ ipcctl_pre_down_nolock('u .BI "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" ");" .SH "ARGUMENTS" .PP \fIstruct ipc_namespace * ns\fR .RS 4 ipc namespace .RE .PP \fIstruct ipc_ids * ids\fR .RS 4 the table of ids where to look for the ipc .RE .PP \fIint id\fR .RS 4 the id of the ipc to retrieve .RE .PP \fIint cmd\fR .RS 4 the cmd to check .RE .PP \fIstruct ipc64_perm * perm\fR .RS 4 the permission to set .RE .PP \fIint extra_perm\fR .RS 4 one extra permission parameter used by msq .RE .SH "DESCRIPTION" .PP 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\&. .PP Call holding the both the rwsem and the rcu read lock\&. .SH "COPYRIGHT" .br