netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.21 1/3] cxgb3 - avoid deadlock with mac watchdog
@ 2007-04-10  3:10 divy
  2007-04-11 15:55 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: divy @ 2007-04-10  3:10 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>

Fix a deadlock when the interface s configured down and 
the watchdog tack is sleeping on rtnl_lock.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---

 drivers/net/cxgb3/cxgb3_main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 26240fd..c6ebe25 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -2119,7 +2119,9 @@ static void check_t3b2_mac(struct adapte
 {
 	int i;
 
-	rtnl_lock();                      /* synchronize with ifdown */
+	if (!rtnl_trylock())	/* synchronize with ifdown */
+		return;
+
 	for_each_port(adapter, i) {
 		struct net_device *dev = adapter->port[i];
 		struct port_info *p = netdev_priv(dev);

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

* Re: [PATCH 2.6.21 1/3] cxgb3 - avoid deadlock with mac watchdog
  2007-04-10  3:10 [PATCH 2.6.21 1/3] cxgb3 - avoid deadlock with mac watchdog divy
@ 2007-04-11 15:55 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-04-11 15:55 UTC (permalink / raw)
  To: divy; +Cc: netdev, linux-kernel, swise

divy@chelsio.com wrote:
> From: Divy Le Ray <divy@chelsio.com>
> 
> Fix a deadlock when the interface s configured down and 
> the watchdog tack is sleeping on rtnl_lock.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
> ---
> 
>  drivers/net/cxgb3/cxgb3_main.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
> index 26240fd..c6ebe25 100644
> --- a/drivers/net/cxgb3/cxgb3_main.c
> +++ b/drivers/net/cxgb3/cxgb3_main.c
> @@ -2119,7 +2119,9 @@ static void check_t3b2_mac(struct adapte
>  {
>  	int i;
>  
> -	rtnl_lock();                      /* synchronize with ifdown */
> +	if (!rtnl_trylock())	/* synchronize with ifdown */
> +		return;
> +
>  	for_each_port(adapter, i) {
>  		struct net_device *dev = adapter->port[i];
>  		struct port_info *p = netdev_priv(dev);


applied 1-3



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

end of thread, other threads:[~2007-04-11 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-10  3:10 [PATCH 2.6.21 1/3] cxgb3 - avoid deadlock with mac watchdog divy
2007-04-11 15:55 ` Jeff Garzik

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