提交 06f71b92 编写于 作者: U Uwe Kleine-König 提交者: Thomas Gleixner

timer: Print function name for timer callbacks modifying preemption count

A function scheduled with a timer must not exit with a different
preempt count than it was entered. To make helping users running into
the corresponding BUG() easier also print the name of the bad function
not only its address.

[ tglx: Sanitized printk ]
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: johnstul@us.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 64ce4c2f
...@@ -1027,11 +1027,8 @@ static inline void __run_timers(struct tvec_base *base) ...@@ -1027,11 +1027,8 @@ static inline void __run_timers(struct tvec_base *base)
lock_map_release(&lockdep_map); lock_map_release(&lockdep_map);
if (preempt_count != preempt_count()) { if (preempt_count != preempt_count()) {
printk(KERN_ERR "huh, entered %p " printk(KERN_ERR "timer: %pF preempt leak: %08x -> %08x\n",
"with preempt_count %08x, exited" fn, preempt_count, preempt_count());
" with %08x?\n",
fn, preempt_count,
preempt_count());
BUG(); BUG();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册