diff options
| author | Randolph Chung <randolph@tausq.org> | 2005-03-28 03:58:26 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-28 03:58:26 -0800 |
| commit | 4158b4b8ca50e3d02bd82ec47284cbbde0fea434 (patch) | |
| tree | 1afd6c36ffbf37c34d1cf70abdb4e1ad38338153 /kernel | |
| parent | 068c82777b6b4f8827dc2820d41d312f2d58ae89 (diff) | |
[PATCH] Missing set_fs() calls around kernel syscall
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/stop_machine.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index e31b1cb8e503..c39ed70af174 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -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, ¶m); + set_fs(KERNEL_DS); + sys_sched_setscheduler(current->pid, SCHED_FIFO, + (struct sched_param __user *)¶m); + set_fs(old_fs); atomic_set(&stopmachine_thread_ack, 0); stopmachine_num_threads = 0; |
