All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Matt Carlson <mcarlson@broadcom.com>
Subject: Re: netpoll + xmit_lock == deadlock
Date: Wed, 29 Jul 2009 14:07:58 -0500	[thread overview]
Message-ID: <1248894478.4545.2822.camel@calx> (raw)
In-Reply-To: <20090729073523.GA4515@gondor.apana.org.au>

On Wed, 2009-07-29 at 15:35 +0800, Herbert Xu wrote:
> Hi:
> 
> While working on TX mitigiation, I noticed that while netpoll
> takes care to avoid recursive dead locks on the NAPI path, it
> has no protection against the TX path when calling the poll
> function.
> 
> So if a driver is in the TX path, and a printk occurs, then a
> recursive dead lock can occur if that driver tries to take the
> xmit lock in its poll function to clean up descriptors.
> 
> Fortunately not a lot of drivers do this but at least some are
> vulnerable to it, e.g., tg3.
> 
> So we need to make it very clear that the poll function must
> not take any locks or they must use try_lock if the driver is
> to support netpoll.

What do you propose?

-- 
http://selenic.com : development and support for Mercurial and Linux



  reply	other threads:[~2009-07-29 19:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29  7:35 netpoll + xmit_lock == deadlock Herbert Xu
2009-07-29 19:07 ` Matt Mackall [this message]
2009-07-29 19:43   ` Neil Horman
2009-07-29 21:48     ` Matt Mackall
2009-07-29 23:15       ` Neil Horman
2009-07-29 23:17         ` Herbert Xu
2009-07-30  1:02           ` Neil Horman
2009-07-31  1:27             ` Herbert Xu
2009-07-29 22:38     ` Herbert Xu
2009-07-30  1:06       ` Neil Horman
2009-07-31  1:30         ` Herbert Xu
2009-07-31 12:56           ` Neil Horman
2009-07-31 13:02             ` Herbert Xu
2009-07-31 18:09               ` Neil Horman
2009-08-02 20:07 ` David Miller
2009-08-03 12:05   ` Ben Hutchings
2009-08-03 19:15     ` David Miller
2009-08-03 19:59       ` Matt Mackall
2009-08-04  4:19         ` David Miller
2009-08-04  6:48           ` Herbert Xu
2009-08-04  0:15   ` Herbert Xu

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=1248894478.4545.2822.camel@calx \
    --to=mpm@selenic.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=mcarlson@broadcom.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.