aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2008-01-17 19:25:03 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-18 14:38:39 -0500
commit5655662dab4ef044be7efd155f2f5fef2e486545 (patch)
treed4003635df3c8cba3554e023d831ff8d4e5828e5 /drivers/net/bonding/bond_main.c
parent027ea0416c955778ceca7ef82e48a1dd6b4617c9 (diff)
bonding: Don't hold lock when calling rtnl_unlock
Change bond_mii_monitor to not hold any locks when calling rtnl_unlock, as rtnl_unlock can sleep (when acquring another mutex in netdev_run_todo). Bug reported by Makito SHIOKAWA <mshiokawa@miraclelinux.com>, who included a different patch. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2c6da4969382..49a198206e3d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2386,7 +2386,9 @@ void bond_mii_monitor(struct work_struct *work)
2386 rtnl_lock(); 2386 rtnl_lock();
2387 read_lock(&bond->lock); 2387 read_lock(&bond->lock);
2388 __bond_mii_monitor(bond, 1); 2388 __bond_mii_monitor(bond, 1);
2389 rtnl_unlock(); 2389 read_unlock(&bond->lock);
2390 rtnl_unlock(); /* might sleep, hold no other locks */
2391 read_lock(&bond->lock);
2390 } 2392 }
2391 2393
2392 delay = ((bond->params.miimon * HZ) / 1000) ? : 1; 2394 delay = ((bond->params.miimon * HZ) / 1000) ? : 1;