netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netpoll + xmit_lock == deadlock
@ 2009-07-29  7:35 Herbert Xu
  2009-07-29 19:07 ` Matt Mackall
  2009-08-02 20:07 ` David Miller
  0 siblings, 2 replies; 21+ messages in thread
From: Herbert Xu @ 2009-07-29  7:35 UTC (permalink / raw)
  To: David S. Miller, Matt Mackall, netdev; +Cc: Matt Carlson

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.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-08-04  6:48 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29  7:35 netpoll + xmit_lock == deadlock Herbert Xu
2009-07-29 19:07 ` Matt Mackall
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

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).