Subject: Re: Question on device events and unregister_netdev.

From: Ben Greear <[email-masked]>
Date: Tue, 11 Jul 2006 16:48:46 -0700

David Miller wrote:
> From: Ben Greear <[email-masked]>
> Date: Tue, 11 Jul 2006 16:27:25 -0700
> 
> 
>>So, the question is: Should I be calling unregister_netdev from the
>>notifier callback?
> 
> 
> Not really, as you saw it can be deadlock prone.
> 
> One idea is to run the unregister asynchronously via a workqueue.
> That should be able to get you out of the deadlock.

After more poking, I notice that 802.1q uses unregister_netdevice,
which does not grab rtnl.  It seems that the notifiers are always called
with rtnl asserted.  That would be a recursive call to unregister_netdevice,
however...any reason that won't work?

Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com