]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ptrace: task_clear_jobctl_trapping()->wake_up_bit() needs mb()
authorOleg Nesterov <oleg@redhat.com>
Thu, 22 May 2014 00:44:01 +0000 (10:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:44:01 +0000 (10:44 +1000)
__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 <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/signal.c

index 6e600aaa2af45b3074a34856582056d010f560bd..9b5453ee5f5e6f30121b54a79b9b3520bac570aa 100644 (file)
@@ -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);
        }
 }