From: Oleg Nesterov Date: Thu, 22 May 2014 00:44:01 +0000 (+1000) Subject: ptrace: task_clear_jobctl_trapping()->wake_up_bit() needs mb() X-Git-Tag: next-20140530~2^2~76 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6641e4af00c6be07b44b4cc6523900d5a54401ee;p=karo-tx-linux.git ptrace: task_clear_jobctl_trapping()->wake_up_bit() needs mb() __wake_up_bit() checks waitqueue_active() and thus the caller needs mb() as wake_up_bit() documents, fix task_clear_jobctl_trapping(). Signed-off-by: Oleg Nesterov Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- diff --git a/kernel/signal.c b/kernel/signal.c index 6e600aaa2af4..9b5453ee5f5e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -277,6 +277,7 @@ void task_clear_jobctl_trapping(struct task_struct *task) { if (unlikely(task->jobctl & JOBCTL_TRAPPING)) { task->jobctl &= ~JOBCTL_TRAPPING; + smp_mb(); /* advised by wake_up_bit() */ wake_up_bit(&task->jobctl, JOBCTL_TRAPPING_BIT); } }