Re: [patch 5/8] hrtimer remove state field

From: Thomas Gleixner
Date: Sun Mar 12 2006 - 08:32:07 EST


Roman,

I looked up the exact problem again.

On Sun, 2006-03-12 at 14:26 +0100, Roman Zippel wrote:
> > softirq runs on CPU0
> > base->lock()
> >
> > remove_timer(timer);
> >
> > base->unlock()
> > signal of previous expiry is delivered on CPU1
> > timer is reqeued.

-------> sig_ignore is set

> > requeue = timer->fn();
> >
> > base->lock()
> >
> > if (requeue)
> > enqueue_timer(timer)
> >
> > --> OOPS
> >
> > We can not wait in the signal delivery path until the callback has been
> > executed, as we hold the posix-timer->lock and this would deadlock
> > timer->fn().
>
> posix_timer either restarts the timer directly or via signal delivery, but
> never both, so this case can't happen (unless there is a bug in the
> posix_timer).

It took quite a time to track this down. Its unlikely, but it _CAN_
happen !

tglx


-
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/