]> err.no Git - linux-2.6/commitdiff
cxgb3 - avoid deadlock with mac watchdog
authorDivy Le Ray <divy@chelsio.com>
Tue, 10 Apr 2007 03:10:22 +0000 (20:10 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 11 Apr 2007 15:54:43 +0000 (11:54 -0400)
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/cxgb3/cxgb3_main.c

index 26240fd5e76835d4fa3af47b44df76675d50fb68..c6ebe25464cad941011230b7c0c1c266aa622ba1 100644 (file)
@@ -2119,7 +2119,9 @@ static void check_t3b2_mac(struct adapter *adapter)
 {
        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);