Messages in this thread Patch in this message | | | From | Uwe Kleine-König <> | Subject | [PATCH] timer: print function name for timer callbacks modifying preemption count | Date | Tue, 16 Feb 2010 16:43:25 +0100 |
| |
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.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- kernel/timer.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/timer.c b/kernel/timer.c index c61a794..ef9a4db 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1027,10 +1027,10 @@ static inline void __run_timers(struct tvec_base *base) lock_map_release(&lockdep_map); if (preempt_count != preempt_count()) { - printk(KERN_ERR "huh, entered %p " + printk(KERN_ERR "huh, entered %p (%pF)" "with preempt_count %08x, exited" " with %08x?\n", - fn, preempt_count, + fn, fn, preempt_count, preempt_count()); BUG(); } -- 1.6.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |