From: Randolph Chung <randolph@tausq.org>

Found by sparse...  since we are passing kernel param to a syscall handler,
we need to do the set_fs() wrappers.

Signed-off-by: Randolph Chung <tausq@debian.org>

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/stop_machine.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN kernel/stop_machine.c~missing-set_fs-calls-around-kernel-syscall kernel/stop_machine.c
--- 25/kernel/stop_machine.c~missing-set_fs-calls-around-kernel-syscall	2005-03-16 17:08:42.000000000 -0800
+++ 25-akpm/kernel/stop_machine.c	2005-03-16 17:09:00.000000000 -0800
@@ -6,6 +6,7 @@
 #include <linux/syscalls.h>
 #include <asm/atomic.h>
 #include <asm/semaphore.h>
+#include <asm/uaccess.h>
 
 /* Since we effect priority and affinity (both of which are visible
  * to, and settable by outside processes) we do indirection via a
@@ -86,9 +87,13 @@ static int stop_machine(void)
 {
 	int i, ret = 0;
 	struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
+	mm_segment_t old_fs = get_fs();
 
 	/* One high-prio thread per cpu.  We'll do this one. */
-	sys_sched_setscheduler(current->pid, SCHED_FIFO, &param);
+	set_fs(KERNEL_DS);
+	sys_sched_setscheduler(current->pid, SCHED_FIFO,
+				(struct sched_param __user *)&param);
+	set_fs(old_fs);
 
 	atomic_set(&stopmachine_thread_ack, 0);
 	stopmachine_num_threads = 0;
_