summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_stp_if.c
diff options
context:
space:
mode:
authorAdrian Drzewiecki <z@drze.net>2006-02-15 01:47:48 -0800
committerDavid S. Miller <davem@davemloft.net>2006-02-15 01:47:48 -0800
commit78872ccb68335b14f0d1ac7338ecfcbf1cba1df4 (patch)
tree20f39c4cddd8f4d461977dc0ed334e61b6c1d431 /net/bridge/br_stp_if.c
parentee68cea2c26b7a8222f9020f54d22c6067011e8b (diff)
downloadop-kernel-dev-78872ccb68335b14f0d1ac7338ecfcbf1cba1df4.zip
op-kernel-dev-78872ccb68335b14f0d1ac7338ecfcbf1cba1df4.tar.gz
[BRIDGE]: Fix deadlock in br_stp_disable_bridge
Looks like somebody forgot to use the _bh spin_lock variant. We ran into a deadlock where br->hello_timer expired while br_stp_disable_br() walked br->port_list. Signed-off-by: Adrian Drzewiecki <z@drze.net> Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r--net/bridge/br_stp_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index cc047f7..35cf3a0 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -67,7 +67,7 @@ void br_stp_disable_bridge(struct net_bridge *br)
{
struct net_bridge_port *p;
- spin_lock(&br->lock);
+ spin_lock_bh(&br->lock);
list_for_each_entry(p, &br->port_list, list) {
if (p->state != BR_STATE_DISABLED)
br_stp_disable_port(p);
@@ -76,7 +76,7 @@ void br_stp_disable_bridge(struct net_bridge *br)
br->topology_change = 0;
br->topology_change_detected = 0;
- spin_unlock(&br->lock);
+ spin_unlock_bh(&br->lock);
del_timer_sync(&br->hello_timer);
del_timer_sync(&br->topology_change_timer);
OpenPOWER on IntegriCloud