summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/stop_machine.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 64c0291b579c..2f6fa95de2d8 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -270,7 +270,11 @@ unlock:
goto retry;
}
- wake_up_q(&wakeq);
+ if (!err) {
+ preempt_disable();
+ wake_up_q(&wakeq);
+ preempt_enable();
+ }
return err;
}