projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
704bde3
)
uprobes: Fix the waitqueue_active() check in xol_free_insn_slot()
author
Oleg Nesterov
<
[email protected]
>
Tue, 21 Jul 2015 13:40:36 +0000
(15:40 +0200)
committer
Ingo Molnar
<
[email protected]
>
Fri, 31 Jul 2015 08:38:07 +0000
(10:38 +0200)
The xol_free_insn_slot()->waitqueue_active() check is buggy. We
need mb() after we set the conditon for wait_event(), or
xol_take_insn_slot() can miss the wakeup.
Signed-off-by: Oleg Nesterov <
[email protected]
>
Cc: Andy Lutomirski <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Pratyush Anand <
[email protected]
>
Cc: Srikar Dronamraju <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/events/uprobes.c
patch
|
blob
|
history
diff --git
a/kernel/events/uprobes.c
b/kernel/events/uprobes.c
index 2d5b7bd337a7c0867d8a985d11f1e45a18b00c37..4e5e9798aa0c0d426962642b69985b9eb09021d6 100644
(file)
--- a/
kernel/events/uprobes.c
+++ b/
kernel/events/uprobes.c
@@
-1337,6
+1337,7
@@
static void xol_free_insn_slot(struct task_struct *tsk)
clear_bit(slot_nr, area->bitmap);
atomic_dec(&area->slot_count);
+ smp_mb__after_atomic(); /* pairs with prepare_to_wait() */
if (waitqueue_active(&area->wq))
wake_up(&area->wq);