Skip to contentSkip to conversation

sched: try to ensure that scheduling bugs reach the user

PATCH New Aaro Koskinen 1 participant 1 message Sep 24, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: try to ensure that scheduling bugs reach the user

This will help debugging on some embedded devices where bugs and oopses are recorded by mtdoops.

---
 kernel/sched.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/sched.c +2 -0
index 2f76e06..19fe1ef 100644
@@ -5279,6 +5279,7 @@ static noinline void __schedule_bug(struct task_struct *prev)
 {
 	struct pt_regs *regs = get_irq_regs();
 
+	bust_spinlocks(1);
 	printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n",
 		prev->comm, prev->pid, preempt_count());
 
@@ -5291,6 +5292,7 @@ static noinline void __schedule_bug(struct task_struct *prev)
 		show_regs(regs);
 	else
 		dump_stack();
+	bust_spinlocks(0);
 }
 
 /*
Signature · 1 line
1.5.4.3