Commit ed653a64 authored by akpm@osdl.org's avatar akpm@osdl.org Committed by Linus Torvalds
Browse files

[PATCH] Remove set_fs() in stop_machine()



)

From: Brian Gerst <bgerst@didntduck.org>

Call sched_setscheduler() directly instead.
Signed-off-by: default avatarBrian Gerst <bgerst@didntduck.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent df2e71fb
......@@ -87,13 +87,9 @@ 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. */
set_fs(KERNEL_DS);
sys_sched_setscheduler(current->pid, SCHED_FIFO,
(struct sched_param __user *)&param);
set_fs(old_fs);
sched_setscheduler(current, SCHED_FIFO, &param);
atomic_set(&stopmachine_thread_ack, 0);
stopmachine_num_threads = 0;
......
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