diff --git a/include/linux/timer.h b/include/linux/timer.h index b1dc583bb4d4bd7a8c51336586b4f897bd755c16..72f3a7781106ab1290198d25edd33a8723588e0b 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -78,8 +78,9 @@ extern unsigned long next_timer_interrupt(void); * Timers with an ->expired field in the past will be executed in the next * timer tick. */ -static inline void add_timer(struct timer_list * timer) +static inline void add_timer(struct timer_list *timer) { + BUG_ON(timer_pending(timer)); __mod_timer(timer, timer->expires); }