[ofa-general] Re: [PATCH/RFC] IB/mad: Fix possible deadlock (cancel_delayed_work inside spinlock)

Roland Dreier rdreier at cisco.com
Fri Aug 14 21:59:17 PDT 2009


 > > 	cancel_mads(mad_agent_priv);
 > > 	port_priv = mad_agent_priv->qp_info->port_priv;
 > >-	cancel_delayed_work(&mad_agent_priv->timed_work);
 > >+	del_timer_sync(&mad_agent_priv->timeout_timer);
 > >+	cancel_work_sync(&mad_agent_priv->timeout_work);
 > 
 > I had to check if there was a race between del_timer_sync() and the worker
 > thread, but the call to cancel_mads() looks like it prevents any issues.

Yeah, I think it's OK, and in any case any race is already there I think
(since cancel_delayed_work is essentially equivalent to del_timer_sync)

Thanks.



More information about the general mailing list