]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] BUG() if setscheduler is called from interrupt context
authorSteven Rostedt <rostedt@goodmis.org>
Tue, 27 Jun 2006 09:54:44 +0000 (02:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 00:32:46 +0000 (17:32 -0700)
commit6c01baa859ad496a3a1801f806cb43fcf90748aa
tree57c5408e8e5596863f4abbe1c822bb0c1c7ff059
parentcb34a872be8a805289307737839afd46b65b32c4
[PATCH] BUG() if setscheduler is called from interrupt context

Thomas Gleixner is adding the call to a rtmutex function in setscheduler.
This call grabs a spin_lock that is not always protected by interrupts
disabled.  So this means that setscheduler cant be called from interrupt
context.

To prevent this from happening in the future, this patch adds a
BUG_ON(in_interrupt()) in that function.  (Thanks to akpm <aka.  Andrew
Morton> for this suggestion).

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c