[patch] hrtimer remove replace state check by BUG_ON

From: Thomas Gleixner
Date: Sun Mar 12 2006 - 11:54:58 EST


The rework of the hrtimer code showed a hard to track sporadic problem
on a testers machine. The !hrtimer_active check in the return path of
the timer callback function prevents requeueing of an enqueued timer.
Replace the check by a BUG_ON to get more info about this not yet
verified problem instead of hiding it away.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

Index: linux-2.6.16-updates/kernel/hrtimer.c
===================================================================
--- linux-2.6.16-updates.orig/kernel/hrtimer.c
+++ linux-2.6.16-updates/kernel/hrtimer.c
@@ -631,9 +631,10 @@ static inline void run_hrtimer_queue(str

spin_lock_irq(&base->lock);

- if (restart != HRTIMER_NORESTART &&
- !hrtimer_active(timer))
+ if (restart != HRTIMER_NORESTART) {
+ BUG_ON(hrtimer_active(timer));
enqueue_hrtimer(timer, base);
+ }
}
set_curr_timer(base, NULL);
spin_unlock_irq(&base->lock);




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/