浏览代码

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 <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Divy Le Ray 18 年之前
父节点
当前提交
f2d961c982
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/net/cxgb3/cxgb3_main.c

+ 3 - 1
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);