From: Manfred Spraul Date: Wed, 22 Aug 2018 05:01:37 +0000 (-0700) Subject: ipc/util.c: correct comment in ipc_obtain_object_check X-Git-Tag: v4.19-rc1~59^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e5ceb452c9b7f0a30c87bd61c01260e3d8464ad;p=thirdparty%2Fkernel%2Flinux.git 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 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 --- diff --git a/ipc/util.c b/ipc/util.c index 1d88dffd75e7b..dcb437095cbde 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -629,8 +629,8 @@ err: * @ids: ipc identifier set * @id: ipc id to look for * - * Similar to ipc_obtain_object_idr() but also checks - * the ipc object reference counter. + * Similar to ipc_obtain_object_idr() but also checks the ipc object + * sequence number. * * Call inside the RCU critical section. * The ipc object is *not* locked on exit.