+ bug-if-setscheduler-is-called-from-interrupt-context.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     BUG() if setscheduler is called from interrupt context

has been added to the -mm tree.  Its filename is

     bug-if-setscheduler-is-called-from-interrupt-context.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: BUG() if setscheduler is called from interrupt context
From: Steven Rostedt <rostedt@xxxxxxxxxxx>


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@xxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/sched.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN kernel/sched.c~bug-if-setscheduler-is-called-from-interrupt-context kernel/sched.c
--- a/kernel/sched.c~bug-if-setscheduler-is-called-from-interrupt-context
+++ a/kernel/sched.c
@@ -3894,6 +3894,8 @@ int sched_setscheduler(struct task_struc
 	unsigned long flags;
 	runqueue_t *rq;
 
+	/* may grab non-irq protected spin_locks */
+	BUG_ON(in_interrupt());
 recheck:
 	/* double check policy once rq lock held */
 	if (policy < 0)
_

Patches currently in -mm which might be from rostedt@xxxxxxxxxxx are

origin.patch
lock-validator-introduce-warn_on_oncecond-speedup.patch
sched-comment-bitmap-size-accounting.patch
unnecessary-long-index-i-in-sched.patch
bug-if-setscheduler-is-called-from-interrupt-context.patch
pi-futex-rt-mutex-docs.patch
pi-futex-rt-mutex-docs-update.patch
drop-tasklist-lock-in-do_sched_setscheduler.patch
rtmutex-propagate-priority-settings-into-pi-lock-chains.patch
genirq-add-irq-chip-support-misroute-irq-dont-call-desc-chip-end.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux