Skip to content

Commit

Permalink
cxgb3 - avoid deadlock with mac watchdog
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Divy Le Ray authored and Jeff Garzik committed Apr 11, 2007
1 parent 692412b commit f2d961c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/cxgb3/cxgb3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f2d961c

Please sign in to comment.