um. Auditing them all is a big task:
akpm-1:/usr/src/linux-2.4.17-pre4> grep -r del_timer . | wc
800 2064 48299
akpm-1:/usr/src/linux-2.4.17-pre4> grep -r del_timer_sync . | wc
85 245 5384
I tried it, when I was a young man.
One mindset would be to just replace all the del_timer calls
with del_timer_sync by default, and to then look for the below
deadlock pattern. But if you do this, Alexey shouts at you,
because his code actually gets del_timer right, by looking at
its return value.
I'd urge you to reconsider. We have a *lot* of timer deletion
races in Linux, and squashing them all in one patch just isn't
feasible.
> The deadlock you're referring to is, I assume, del_timer_sync() called
> inside the timer itself? Can you think of any other dangerous cases?
Nope. The deadlock is where the caller of del_timer_sync holds
some lock which would prevent the completion of the timer handler.
It happens, and is sometimes subtle.
drivers/video/txfxfb.c is an unsubtle example.
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/