Skip to content

Commit 2e5ceb4

Browse files
manfred-colorfutorvalds
authored andcommitted
ipc/util.c: correct comment in ipc_obtain_object_check
The comment that explains ipc_obtain_object_check is wrong: The function checks the sequence number, not the reference counter. Note that checking the reference counter would be meaningless: The reference counter is decreased without holding any locks, thus an object with kern_ipc_perm.deleted=true may disappear at the end of the next rcu grace period. Link: http://lkml.kernel.org/r/20180712185241.4017-6-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>
1 parent 4241c1a commit 2e5ceb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ipc/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id)
629629
* @ids: ipc identifier set
630630
* @id: ipc id to look for
631631
*
632-
* Similar to ipc_obtain_object_idr() but also checks
633-
* the ipc object reference counter.
632+
* Similar to ipc_obtain_object_idr() but also checks the ipc object
633+
* sequence number.
634634
*
635635
* Call inside the RCU critical section.
636636
* The ipc object is *not* locked on exit.

0 commit comments

Comments
 (0)