summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/timer.c6
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)