diff options
| author | Manfred Spraul <[email protected]> | 2011-07-26 00:11:47 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2011-07-26 03:57:07 +0000 |
| commit | d694ad62bf539dbb20a0899ac2a954555f9e4a83 (patch) | |
| tree | fd3ddc3269b6ad40a448046e60560fec30fbb0c5 /mm/sparse.c | |
| parent | Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cp... (diff) | |
| download | kernel-d694ad62bf539dbb20a0899ac2a954555f9e4a83.tar.gz kernel-d694ad62bf539dbb20a0899ac2a954555f9e4a83.zip | |
ipc/sem.c: fix race with concurrent semtimedop() timeouts and IPC_RMID
If a semaphore array is removed and in parallel a sleeping task is woken
up (signal or timeout, does not matter), then the woken up task does not
wait until wake_up_sem_queue_do() is completed. This will cause crashes,
because wake_up_sem_queue_do() will read from a stale pointer.
The fix is simple: Regardless of anything, always call get_queue_result().
This function waits until wake_up_sem_queue_do() has finished it's task.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=27142
Reported-by: Yuriy Yevtukhov <[email protected]>
Reported-by: Harald Laabs <[email protected]>
Signed-off-by: Manfred Spraul <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Cc: <[email protected]> [2.6.35+]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/sparse.c')
0 files changed, 0 insertions, 0 deletions
