His work was a masterpiece. Linus was looking at the timer_exit()
abomination last week and I sent a smorgasbord of patches which remove
it. Hoping to see one come back at us soon.
But del_timer_sync(), like del_timer() still must not be used on
self-kfreeing timers. I think a variant could be made to do so quite
easily (esp. if Linus chooses the right patch).
- grab the timerlist_lock
- see if any timers are running. If so, unlock and retry.
- walk the tvecs looking for the timer.
Very expensive but OK for occasional things like module unload.
The refcounting games which you and Alexey play are more efficient,
elegant and general, but hard for mortals to employ. Particularly if
the timer is to be grafted onto some existing subsystem.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/