]> err.no Git - linux-2.6/commit
hrtimer: timeout too long when using HRTIMER_CB_SOFTIRQ
authorBodo Stroesser <bstroesser@fujitsu-siemens.com>
Sat, 26 Apr 2008 21:10:16 +0000 (14:10 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 27 Apr 2008 16:26:43 +0000 (18:26 +0200)
commitd7b41a24bfb5d7fa02f7b49be1293d468814e424
tree37c206c5125aca1084b8c4d76f80c5de4dec7c38
parentc3bf9bc243092c53946fd6d8ebd6dc2f4e572d48
hrtimer: timeout too long when using HRTIMER_CB_SOFTIRQ

When using hrtimer with timer->cb_mode == HRTIMER_CB_SOFTIRQ
in some cases the clockevent is not programmed.
This happens, if:
 - a timer is rearmed while it's state is HRTIMER_STATE_CALLBACK
 - hrtimer_reprogram() returns -ETIME, when it is called after
   CALLBACK is finished. This occurs if the new timer->expires
   is in the past when CALLBACK is done.
In this case, the timer needs to be removed from the tree and put
onto the pending list again.

The patch is against 2.6.22.5, but AFAICS, it is relevant
for 2.6.25 also (in run_hrtimer_pending()).

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Cc: stable@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/hrtimer.c