Subject: Re: [PATCH] atm: clip timer race

From: Roland Dreier <[email-masked]>
Date: Thu, 13 Apr 2006 14:08:29 -0700

Herbert> I don't think this is enough though since this timer is
    Herbert> one of those self-rescheduling timers.  You need to
    Herbert> provide some sort of a flag for it to stop scheduling
    Herbert> itself and synchronise it properly.

I'm probably missing an obvious race but it seems del_timer_sync()
should be fine on a timer that reschedules itself.  del_timer_sync()
loops until try_to_del_timer_sync() succeeds, and
try_to_del_timer_sync() will fail unless the timer being killed is not
running (and it does this test with the timer base lock held).

OK, how am I being stupid?

 - R.