Commit 650226bd authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

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: default avatarOleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4e52365f
...@@ -277,6 +277,7 @@ void task_clear_jobctl_trapping(struct task_struct *task) ...@@ -277,6 +277,7 @@ void task_clear_jobctl_trapping(struct task_struct *task)
{ {
if (unlikely(task->jobctl & JOBCTL_TRAPPING)) { if (unlikely(task->jobctl & JOBCTL_TRAPPING)) {
task->jobctl &= ~JOBCTL_TRAPPING; task->jobctl &= ~JOBCTL_TRAPPING;
smp_mb(); /* advised by wake_up_bit() */
wake_up_bit(&task->jobctl, JOBCTL_TRAPPING_BIT); wake_up_bit(&task->jobctl, JOBCTL_TRAPPING_BIT);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment