diff options
author | Andrew Morton <akpm@osdl.org> | 2005-10-30 18:02:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:21 -0500 |
commit | 15d2bace5ec907530a3d0e0cf4bb1bd29f3ad7b7 (patch) | |
tree | 52434f3ad069dadb6e70461888c2a068c44a9738 /include/linux | |
parent | 2ca7d93bb27876e5fd4ebfcb3b00627107bdad4d (diff) |
[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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/timer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index b1dc583bb4d4..72f3a7781106 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -78,8 +78,9 @@ extern unsigned long next_timer_interrupt(void); | |||
78 | * Timers with an ->expired field in the past will be executed in the next | 78 | * Timers with an ->expired field in the past will be executed in the next |
79 | * timer tick. | 79 | * timer tick. |
80 | */ | 80 | */ |
81 | static inline void add_timer(struct timer_list * timer) | 81 | static inline void add_timer(struct timer_list *timer) |
82 | { | 82 | { |
83 | BUG_ON(timer_pending(timer)); | ||
83 | __mod_timer(timer, timer->expires); | 84 | __mod_timer(timer, timer->expires); |
84 | } | 85 | } |
85 | 86 | ||