lkml.org 
[lkml]   [2010]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] timer: print function name for timer callbacks modifying preemption count
Date
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/

\
 
 \ /
  Last update: 2010-02-16 16:47    [W:0.027 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site