
From: Andrea Arcangeli <andrea@suse.de>

We need a barrier before checking for kthread_should_stop in do_stop.


---

 25-akpm/kernel/stop_machine.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN kernel/stop_machine.c~stop_machine-barrier-fixes kernel/stop_machine.c
--- 25/kernel/stop_machine.c~stop_machine-barrier-fixes	2004-04-04 17:16:08.358540760 -0700
+++ 25-akpm/kernel/stop_machine.c	2004-04-04 17:16:08.361540304 -0700
@@ -149,10 +149,10 @@ static int do_stop(void *_smdata)
 	complete(&smdata->done);
 
 	/* Wait for kthread_stop */
-	__set_current_state(TASK_INTERRUPTIBLE);
+	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
 		schedule();
-		__set_current_state(TASK_INTERRUPTIBLE);
+		set_current_state(TASK_INTERRUPTIBLE);
 	}
 	__set_current_state(TASK_RUNNING);
 	return ret;

_
