path: root/ipc/shm.c
diff options
authorManfred Spraul <>2018-08-21 22:01:34 -0700
committerLinus Torvalds <>2018-08-22 10:52:51 -0700
commit4241c1a304078569f544d51eeaf8bc270b6e377a (patch)
tree9468a64167df7d9919bfab0f3206baa937ab7235 /ipc/shm.c
parent39cfffd774a2e8818250360a3e028b5eac9d5392 (diff)
ipc: rename ipcctl_pre_down_nolock()
Both the comment and the name of ipcctl_pre_down_nolock() are misleading: The function must be called while holdling the rw semaphore. Therefore the patch renames the function to ipcctl_obtain_check(): This name matches the other names used in util.c: - "obtain" function look up a pointer in the idr, without acquiring the object lock. - The caller is responsible for locking. - _check means that the sequence number is checked. Link: Signed-off-by: Manfred Spraul <> Reviewed-by: Davidlohr Bueso <> Cc: Davidlohr Bueso <> Cc: Dmitry Vyukov <> Cc: Herbert Xu <> Cc: Kees Cook <> Cc: Michael Kerrisk <> Cc: Michal Hocko <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'ipc/shm.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 6e7bd9830549..a413ddf74dac 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -881,7 +881,7 @@ static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd,
- ipcp = ipcctl_pre_down_nolock(ns, &shm_ids(ns), shmid, cmd,
+ ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd,
&shmid64->shm_perm, 0);
if (IS_ERR(ipcp)) {
err = PTR_ERR(ipcp);