[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090729223831.GA14066@gondor.apana.org.au>
Date: Thu, 30 Jul 2009 06:38:32 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Neil Horman <nhorman@...driver.com>
Cc: Matt Mackall <mpm@...enic.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Matt Carlson <mcarlson@...adcom.com>
Subject: Re: netpoll + xmit_lock == deadlock
On Wed, Jul 29, 2009 at 03:43:00PM -0400, Neil Horman wrote:
>
> I think there is actually some recursion protection. If you look in
> netpoll_send_skb (where all netpoll transmits pass through), we do a
> __netif_tx_trylock, and only continue down the tx path if we obtain the lock.
> If not, we call netpoll_poll, wait a while, and try again. I think that should
> prevent the deadlock condition you are concerned about.
When netpoll_poll calls dev->poll which then takes the TX lock
you have no protection whatsoever. Some drivers do this in order
to ensure that TX descriptor cleanups do not race against the
transmitting side. See tg3 for an example.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists