Files
Linux/ipc
Manfred Spraul e8577d1f03 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]>
2014-12-03 09:36:03 -08:00
..
2014-06-06 16:08:14 -07:00
2014-10-14 02:18:23 +02:00
2010-03-12 15:52:32 -08:00
2014-04-07 16:36:11 -07:00
2014-06-06 16:08:15 -07:00
2014-06-06 16:08:14 -07:00