Commit d1e069e2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] add stop_machine barriers

From: Andrea Arcangeli <andrea@suse.de>

We need a barrier before checking for kthread_should_stop in do_stop.
parent 26abb4bd
...@@ -149,10 +149,10 @@ static int do_stop(void *_smdata) ...@@ -149,10 +149,10 @@ static int do_stop(void *_smdata)
complete(&smdata->done); complete(&smdata->done);
/* Wait for kthread_stop */ /* Wait for kthread_stop */
__set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) { while (!kthread_should_stop()) {
schedule(); schedule();
__set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
} }
__set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
return ret; return ret;
......
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