Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15d2bace authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

[PATCH] add_timer() of a pending timer is illegal



In the recent timer rework we lost the check for an add_timer() of an
already-pending timer.  That check was useful for networking, so put it back.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2ca7d93b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ extern unsigned long next_timer_interrupt(void);
 */
static inline void add_timer(struct timer_list *timer)
{
	BUG_ON(timer_pending(timer));
	__mod_timer(timer, timer->expires);
}