提交 8e85b4b5 编写于 作者: T Thomas Gleixner 提交者: Ingo Molnar

softirqs, debug: preemption check

if a preempt count leaks out of a softirq handler it can be very hard
to figure it out. Add a debug check for this.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 978b0116
......@@ -205,7 +205,18 @@ asmlinkage void __do_softirq(void)
do {
if (pending & 1) {
int prev_count = preempt_count();
h->action(h);
if (unlikely(prev_count != preempt_count())) {
printk(KERN_ERR "huh, entered sotfirq %ld %p"
"with preempt_count %08x,"
" exited with %08x?\n", h - softirq_vec,
h->action, prev_count, preempt_count());
preempt_count() = prev_count;
}
rcu_bh_qsctr_inc(cpu);
}
h++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册