netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nhorman@tuxdriver.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] netconsole: fix deadlock when removing net driver that netconsole is using (v2)
Date: Fri, 22 Apr 2011 14:34:08 -0700 (PDT)	[thread overview]
Message-ID: <20110422.143408.112583207.davem@davemloft.net> (raw)
In-Reply-To: <20110422213145.GA2332@neilslaptop.think-freely.org>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 22 Apr 2011 17:31:45 -0400

> I understand what you're saying here, but I think we're ok in this particular
> case.  I say that because all other callers of __netpoll_cleanup, call it via
> netpoll_cleanup, which does the dev_put under protection of the rtnl_lock.  This
> call is also under the rtnl_lock protection, its just taken when the event
> notification is made (thats why we call __netpoll_cleanup instead of
> netpoll_cleanup).  The target_list_lock just protects the integrity of the
> netconsole_target list.  If someone disables a netconsole via configfs, they'll
> block on the rtnl_lock.  Since no path through configfs takes the
> target_list_lock and rtnl (via netpoll_cleanup) in any nested fashion, we're
> safe from deadlock.

That's right, rtnl saves us.

Thanks for explaining, applied, thanks!

      reply	other threads:[~2011-04-22 21:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 14:06 [PATCH] netconsole: prevent deadlock when removing net driver that netconsole is using Neil Horman
2011-04-22 14:44 ` Neil Horman
2011-04-22 18:10 ` [PATCH] netconsole: fix deadlock when removing net driver that netconsole is using (v2) Neil Horman
2011-04-22 18:40   ` David Miller
2011-04-22 21:31     ` Neil Horman
2011-04-22 21:34       ` David Miller [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=20110422.143408.112583207.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /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).