ChangeSet 1.2231.1.151, 2005/03/28 19:58:26-08:00, [EMAIL PROTECTED]
[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 <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
stop_machine.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
diff -Nru a/kernel/stop_machine.c b/kernel/stop_machine.c
--- a/kernel/stop_machine.c 2005-03-28 21:39:40 -08:00
+++ b/kernel/stop_machine.c 2005-03-28 21:39:40 -08:00
@@ -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 @@
{
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;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html