[ofa-general] [PATCH v2] ipiob: fix rtnl deadlock

Roland Dreier rdreier at cisco.com
Sun Aug 17 17:32:46 PDT 2008


 > >  register_failed:
 > >  	ib_unregister_event_handler(&priv->event_handler);
 > > -	flush_scheduled_work();
 > > +	flush_workqueue(ipoib_workqueue);
 > >  
 > 
 > I don't find any flaw in this approach, but I don't understand why is
 > the flush_workqueue(ipoib_workqueue) above needed.

It's mostly fixing the old code... but it makes sense to me, since this
is the error path unwinding things after we registered an event
handler.  So an IB async event could have occurred and caused us to
schedule work for this netdevice, and we should wait for that scheduled
work before freeing the netdevice.

It may be worth auditing whether we shouldn't register the event handler
until later, since it might cause problems to handle an async event
before registering a netdev...

 - R.



More information about the general mailing list