aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2008-03-22 01:29:33 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-25 23:15:38 -0400
commit2bf86b7aa8e74bf81a9872f7b610f49b610a4649 (patch)
tree243fab364159920c950e393194c0ba8421a15d05 /drivers/net/bonding
parent26c080bf8308449330037f91daa3ac0a7c41023e (diff)
bonding: Fix locking in 802.3ad mode
The 802.3ad state machine lock can be acquired in both softirq and not softirq context, but was not held at _bh to prevent a deadlock (which could occur if a LACPDU arrived and was processed while the lock was held). Corrected this, now hold the state machine lock at _bh to prevent deadlock. Bug reported by Todd Fleisher <todd@fleish.org>. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_3ad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index cb3c6faa7888..d16e0e1d2b30 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -310,7 +310,7 @@ static inline int __check_agg_selection_timer(struct port *port)
310 */ 310 */
311static inline void __get_rx_machine_lock(struct port *port) 311static inline void __get_rx_machine_lock(struct port *port)
312{ 312{
313 spin_lock(&(SLAVE_AD_INFO(port->slave).rx_machine_lock)); 313 spin_lock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
314} 314}
315 315
316/** 316/**
@@ -320,7 +320,7 @@ static inline void __get_rx_machine_lock(struct port *port)
320 */ 320 */
321static inline void __release_rx_machine_lock(struct port *port) 321static inline void __release_rx_machine_lock(struct port *port)
322{ 322{
323 spin_unlock(&(SLAVE_AD_INFO(port->slave).rx_machine_lock)); 323 spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
324} 324}
325 325
326/** 326/**