Commit 22356f44 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Linus Torvalds

mm: Place preemption point in do_mlockall() loop

There is a loop in do_mlockall() that lacks a preemption point, which
means that the following can happen on non-preemptible builds of the
kernel. Dave Jones reports:

 "My fuzz tester keeps hitting this.  Every instance shows the non-irq
  stack came in from mlockall.  I'm only seeing this on one box, but
  that has more ram (8gb) than my other machines, which might explain

    INFO: rcu_preempt self-detected stall on CPU { 3}  (t=6500 jiffies g=470344 c=470343 q=0)
    sending NMI to all CPUs:
    NMI backtrace for cpu 3
    CPU: 3 PID: 29664 Comm: trinity-child2 Not tainted 3.11.0-rc1+ #32
    Call Trace:

This commit addresses this problem by inserting the required preemption
Reported-by: default avatarDave Jones <>
Signed-off-by: default avatarPaul E. McKenney <>
Cc: KOSAKI Motohiro <>
Cc: Michel Lespinasse <>
Cc: Andrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a153e67b
......@@ -736,6 +736,7 @@ static int do_mlockall(int flags)
/* Ignore errors */
mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags);
return 0;
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