From: Divy Le Ray Date: Tue, 10 Apr 2007 03:10:22 +0000 (-0700) Subject: cxgb3 - avoid deadlock with mac watchdog X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2d961c9827bab4b64a1b4ea30c68cf5ab2b2330;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git cxgb3 - avoid deadlock with mac watchdog Fix a deadlock when the interface s configured down and the watchdog tack is sleeping on rtnl_lock. Signed-off-by: Divy Le Ray Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 26240fd5e768..c6ebe25464ca 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 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);