aboutsummaryrefslogtreecommitdiffstats
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorManfred Spraul <[email protected]>2014-12-02 23:59:34 +0000
committerLinus Torvalds <[email protected]>2014-12-03 17:36:03 +0000
commite8577d1f0329d4842e8302e289fb2c22156abef4 (patch)
treef16f344a3d414db2a0d848b7ca19470b468c902e /lib/genalloc.c
parentdrivers/input/evdev.c: don't kfree() a vmalloc address (diff)
downloadkernel-e8577d1f0329d4842e8302e289fb2c22156abef4.tar.gz
kernel-e8577d1f0329d4842e8302e289fb2c22156abef4.zip
ipc/sem.c: fully initialize sem_array before making it visible
ipc_addid() makes a new ipc identifier visible to everyone. New objects start as locked, so that the caller can complete the initialization after the call. Within struct sem_array, at least sma->sem_base and sma->sem_nsems are accessed without any locks, therefore this approach doesn't work. Thus: Move the ipc_addid() to the end of the initialization. Signed-off-by: Manfred Spraul <[email protected]> Reported-by: Rik van Riel <[email protected]> Acked-by: Rik van Riel <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Acked-by: Rafael Aquini <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions