Skip to content
Commit b84ff7d6 authored by Mike Galbraith's avatar Mike Galbraith Committed by Ingo Molnar
Browse files

sched: Fix kthread_bind() by moving the body of kthread_bind() to sched.c



Eric Paris reported that commit
f685ceac causes boot time
PREEMPT_DEBUG complaints.

 [    4.590699] BUG: using smp_processor_id() in preemptible [00000000] code: rmmod/1314
 [    4.593043] caller is task_hot+0x86/0xd0

Since kthread_bind() messes with scheduler internals, move the
body to sched.c, and lock the runqueue.

Reported-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
Tested-by: default avatarEric Paris <eparis@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1256813310.7574.3.camel@marge.simson.net>
[ v2: fix !SMP build and clean up ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6b9de613
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment