netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: Question on device events and unregister_netdev.
Date: Tue, 11 Jul 2006 16:48:46 -0700	[thread overview]
Message-ID: <44B438DE.3020503@candelatech.com> (raw)
In-Reply-To: <20060711.164331.122338629.davem@davemloft.net>

David Miller wrote:
> From: Ben Greear <greearb@candelatech.com>
> 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 <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


      reply	other threads:[~2006-07-11 23:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11 23:27 Question on device events and unregister_netdev Ben Greear
2006-07-11 23:43 ` David Miller
2006-07-11 23:48   ` Ben Greear [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44B438DE.3020503@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).