path: root/ipc/util.h
diff options
authorDavidlohr Bueso <>2018-08-21 22:01:41 -0700
committerLinus Torvalds <>2018-08-22 10:52:52 -0700
commit82061c57ce93caa50fd01c11f8eb30ddc4c4bd75 (patch)
treee8f8077ee5442eec5e372b343ce117b43bf538e7 /ipc/util.h
parent2e5ceb452c9b7f0a30c87bd61c01260e3d8464ad (diff)
ipc: drop ipc_lock()
ipc/util.c contains multiple functions to get the ipc object pointer given an id number. There are two sets of function: One set verifies the sequence counter part of the id number, other functions do not check the sequence counter. The standard for function names in ipc/util.c is - ..._check() functions verify the sequence counter - ..._idr() functions do not verify the sequence counter ipc_lock() is an exception: It does not verify the sequence counter value, but this is not obvious from the function name. Furthermore, shm.c is the only user of this helper. Thus, we can simply move the logic into shm_lock() and get rid of the function altogether. [ most of changelog] Link: Signed-off-by: Davidlohr Bueso <> Signed-off-by: Manfred Spraul <> 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/util.h')
1 files changed, 0 insertions, 1 deletions
diff --git a/ipc/util.h b/ipc/util.h
index fcf81425ae98..e3c47b21db93 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -142,7 +142,6 @@ int ipc_rcu_getref(struct kern_ipc_perm *ptr);
void ipc_rcu_putref(struct kern_ipc_perm *ptr,
void (*func)(struct rcu_head *head));
-struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int);
struct kern_ipc_perm *ipc_obtain_object_idr(struct ipc_ids *ids, int id);
void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out);