[ofa-general] Re: [PATCH v2] ipoib: fix hang while bringing down uninitialized interface

Roland Dreier rdreier at cisco.com
Mon Sep 29 20:24:39 PDT 2008


 > - handle a case when ipoib_ib_dev_stop() is called twice on the
 >   same dev->priv - zero the timer after its deletion.

I don't understand why this is an issue and why:

 > +	/* Make sure the timer was initialized */
 > +	if (priv->poll_timer.function) {
 > +		del_timer_sync(&priv->poll_timer);
 > +		memset(&priv->poll_timer, 0, sizeof priv->poll_timer);

this memset is needed.

If the timer isn't pending, isn't del_timer_sync() just a no-op?  What
am I missing?

 - R.



More information about the general mailing list