android_kernel_samsung_msm8976/ipc
Linus Torvalds 162d3c2fd8 Initialize msg/shm IPC objects before doing ipc_addid()
commit b9a532277938798b53178d5a66af6e2915cb27cf upstream.

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-22 14:37:51 -07:00
..
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
compat.c ipc: fix compat msgrcv with negative msgtyp 2015-04-19 10:10:50 +02:00
compat_mq.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
ipc_sysctl.c ipc: always handle a new value of auto_msgmni 2014-11-21 09:22:54 -08:00
ipcns_notifier.c
mq_sysctl.c ipc,mqueue: remove limits for the amount of system-wide queues 2014-03-06 21:30:12 -08:00
mqueue.c ipc: modify message queue accounting to not take kernel data structures into account 2015-08-16 20:51:40 -07:00
msg.c Initialize msg/shm IPC objects before doing ipc_addid() 2015-10-22 14:37:51 -07:00
msgutil.c ipc, msg: fix message length check for negative values 2013-12-04 10:56:10 -08:00
namespace.c ipc: drop ipc_lock_by_ptr 2013-10-18 07:45:48 -07:00
sem.c ipc/sem.c: update/correct memory barriers 2015-09-13 09:07:59 -07:00
shm.c Initialize msg/shm IPC objects before doing ipc_addid() 2015-10-22 14:37:51 -07:00
syscall.c get rid of union semop in sys_semctl(2) arguments 2013-03-05 15:14:16 -05:00
util.c Initialize msg/shm IPC objects before doing ipc_addid() 2015-10-22 14:37:51 -07:00
util.h ipc, msg: fix message length check for negative values 2013-12-04 10:56:10 -08:00