diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2011-07-25 17:11:47 -0700 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-10-28 11:15:51 +0200 |
commit | 15498c389ee7534b7b2828ee40eb5efad0b8f037 (patch) | |
tree | d2da75e605b5ed5f26ed8ff405d919c4adfb1e83 /Documentation/sparse.txt | |
parent | e879ff3ef1ee6d3d92f8dafea79983493572f43b (diff) |
ipc/sem.c: fix race with concurrent semtimedop() timeouts and IPC_RMID
commit d694ad62bf539dbb20a0899ac2a954555f9e4a83 upstream.
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 <yuriy@ucoz.com>
Reported-by: Harald Laabs <kernel@dasr.de>
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change-Id: I01f75f42051c51e6e974b7e4671862de01ad4cc6
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35669
Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'Documentation/sparse.txt')
0 files changed, 0 insertions, 0 deletions