7a77379e7e
(cherry pick from commit b9a532277938798b53178d5a66af6e2915cb27cf) As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state cannot be seen. We already did this for the IPC semaphore code (see commit e8577d1f0329: "ipc/sem.c: fully initialize sem_array before making it visible") but we clearly forgot about msg and shm. Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: Manfred Spraul <manfred@colorfullife.com> Cc: Davidlohr Bueso <dbueso@suse.de> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 24551430 Change-Id: Ic7b980a6f2a79eb3c04fc43b6531c396645af1db Conflicts: ipc/msg.c ipc/shm.c |
||
---|---|---|
.. | ||
Makefile | ||
compat.c | ||
compat_mq.c | ||
ipc_sysctl.c | ||
ipcns_notifier.c | ||
mq_sysctl.c | ||
mqueue.c | ||
msg.c | ||
msgutil.c | ||
namespace.c | ||
sem.c | ||
shm.c | ||
syscall.c | ||
util.c | ||
util.h |