diff options
author | Yong Zhang <yong.zhang@windriver.com> | 2010-10-21 02:57:33 +0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-22 16:46:25 +0400 |
commit | 466bd3030973910118ca601da8072be97a1e2209 (patch) | |
tree | 70194e60d4054d045f35e29ee4fcd2230c2622dc /kernel/timer.c | |
parent | 1118e2cd33d47254854e1ba3ba8e32802ff14fdf (diff) | |
download | linux-466bd3030973910118ca601da8072be97a1e2209.tar.xz |
timer: Warn when del_timer_sync() is called in hardirq context
Add explict warning when del_timer_sync() is called in hardirq
context.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 612de0306e79..483e54ba5c93 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -974,7 +974,11 @@ int del_timer_sync(struct timer_list *timer) lock_map_release(&timer->lockdep_map); local_bh_enable(); #endif - + /* + * don't use it in hardirq context, because it + * could lead to deadlock. + */ + WARN_ON(in_irq()); for (;;) { int ret = try_to_del_timer_sync(timer); if (ret >= 0) |