[ewg] [PATCH] IPoIB: synchronize timer deletion with completion handler

Roland Dreier rdreier at cisco.com
Wed Dec 9 14:39:49 PST 2009


 > When calling del_timer_sync on priv->poll_timer, it is necessary to prevent
 > farther arming of the timer which can be done by a completion handler. Though
 > it is harmless since the timer will eventually stop being rearmed, it is better
 > practice to avoid calling the timer function after it is deleted. This patch
 > handles this by using a new flag that is checked before arming the timer.

have you seen this in practice?  If it can happen then it's not
harmless, since the module could be unloaded with the timer pending.
However I don't see how it could happen, since we only seem to delete
the timer after we know that no more completions are coming (except for
the case where we decide that the hardware is wedged but it really only
takes a *long* time to respond at exactly the wrong time, and we somehow
get a completion between the del_timer_sync and the modify QP to reset
state -- which is so unlikely it seems not worth adding this extra
complexity for -- maybe we could add the del_timer_sync to after we
delete the CQ or something if you're really worried)



More information about the ewg mailing list