]> git.hungrycats.org Git - linux/commit
[PATCH] too much timer simplification...
authorGeorge Anzinger <george@mvista.com>
Fri, 11 Apr 2003 14:09:44 +0000 (07:09 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 11 Apr 2003 14:09:44 +0000 (07:09 -0700)
commit29c36d50a52660dfb9e9112e9cec8720267132c0
tree0512916dcbe6d8c963425e5c60adbfd16eff93c0
parent7b55ea658ef29f90d82be7388b695ef922d27a63
[PATCH] too much timer simplification...

Noted by David Mosberger:

 "If someone happens to arm a periodic timer at exactly 256 jiffies (as
  ohci happens to do on platforms with HZ=1024), then you end up getting
  an endless loop of timer activations, causing a machine hang.

  The problem is that __run_timers updates base->timer_jiffies _before_
  running the callback routines.  If a callback re-arms the timer at
  exactly 256 jiffies, add_timers() will reinsert the timer into the list
  that we're currently processing, which of course will cause the timer to
  expire immediately again, etc., etc., ad naseum... "

The answer here is to move the whole expired list to a local header and
to not look back.
kernel/timer.c