diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-03-11 17:04:46 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-03-12 16:40:42 -0500 |
commit | 06f71b922ce5a05352acd706564ca4ae1f2add0e (patch) | |
tree | 36e2febfdb380364f1df10c48560695d8406635f | |
parent | 64ce4c2f5252f25798117fa80a027993163d6d84 (diff) |
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: johnstul@us.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/timer.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index c61a7949387f..f82f4bfe2d88 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1027,11 +1027,8 @@ static inline void __run_timers(struct tvec_base *base) | |||
1027 | lock_map_release(&lockdep_map); | 1027 | lock_map_release(&lockdep_map); |
1028 | 1028 | ||
1029 | if (preempt_count != preempt_count()) { | 1029 | if (preempt_count != preempt_count()) { |
1030 | printk(KERN_ERR "huh, entered %p " | 1030 | printk(KERN_ERR "timer: %pF preempt leak: %08x -> %08x\n", |
1031 | "with preempt_count %08x, exited" | 1031 | fn, preempt_count, preempt_count()); |
1032 | " with %08x?\n", | ||
1033 | fn, preempt_count, | ||
1034 | preempt_count()); | ||
1035 | BUG(); | 1032 | BUG(); |
1036 | } | 1033 | } |
1037 | } | 1034 | } |