[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>
diff --git a/include/linux/timer.h b/include/linux/timer.h
index b1dc583..72f3a77 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -78,8 +78,9 @@
  * 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);
 }