Skip to content

Commit

Permalink
[PATCH] add_timer() of a pending timer is illegal
Browse files Browse the repository at this point in the history
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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 31, 2005
1 parent 2ca7d93 commit 15d2bac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 15d2bac

Please sign in to comment.