diff options
| author | Manfred Spraul <manfred@colorfullife.com> | 2018-08-22 01:01:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 13:52:51 -0400 |
| commit | 4241c1a304078569f544d51eeaf8bc270b6e377a (patch) | |
| tree | 9468a64167df7d9919bfab0f3206baa937ab7235 /ipc/shm.c | |
| parent | 39cfffd774a2e8818250360a3e028b5eac9d5392 (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: http://lkml.kernel.org/r/20180712185241.4017-5-manfred@colorfullife.com
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Reviewed-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Kees Cook <keescook@chromium.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
| -rw-r--r-- | ipc/shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -881,7 +881,7 @@ static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, | |||
| 881 | down_write(&shm_ids(ns).rwsem); | 881 | down_write(&shm_ids(ns).rwsem); |
| 882 | rcu_read_lock(); | 882 | rcu_read_lock(); |
| 883 | 883 | ||
| 884 | ipcp = ipcctl_pre_down_nolock(ns, &shm_ids(ns), shmid, cmd, | 884 | ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, |
| 885 | &shmid64->shm_perm, 0); | 885 | &shmid64->shm_perm, 0); |
| 886 | if (IS_ERR(ipcp)) { | 886 | if (IS_ERR(ipcp)) { |
| 887 | err = PTR_ERR(ipcp); | 887 | err = PTR_ERR(ipcp); |
