]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hrtimer: timeout too long when using HRTIMER_CB_SOFTIRQ
authorBodo Stroesser <bstroesser@fujitsu-siemens.com>
Mon, 28 Apr 2008 17:15:50 +0000 (17:15 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 May 2008 21:44:38 +0000 (14:44 -0700)
commit59c5775ada913643998fd78d8a5b1a76ba57515f
treec89965b48ffa69c1a67f16ca942db1db32513773
parentde15f7b048a6fe9df998a4fd854a0ac9eb87b80f
hrtimer: timeout too long when using HRTIMER_CB_SOFTIRQ

commit d7b41a24bfb5d7fa02f7b49be1293d468814e424 upstream

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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/hrtimer.c