From: Chris Wright Date: Thu, 16 Feb 2006 08:20:39 +0000 (-0800) Subject: Fix deadlock in br_stp_disable_bridge, fwd from shemminger X-Git-Tag: v2.6.15.5~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ae71f65cbf42ab80b4e98a51da6bb7b4ca4df96;p=thirdparty%2Fkernel%2Fstable-queue.git Fix deadlock in br_stp_disable_bridge, fwd from shemminger --- diff --git a/queue/fix-deadlock-in-br_stp_disable_bridge.patch b/queue/fix-deadlock-in-br_stp_disable_bridge.patch new file mode 100644 index 00000000000..31ac4db9068 --- /dev/null +++ b/queue/fix-deadlock-in-br_stp_disable_bridge.patch @@ -0,0 +1,38 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Adrian Drzewiecki +Date: Wed Feb 15 01:47:48 2006 -0800 +Subject: [PATCH] [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 +Signed-off-by: Stephen Hemminger +Signed-off-by: David S. Miller +Signed-off-by: Chris Wright +--- + + net/bridge/br_stp_if.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +--- linux-2.6.15.4.orig/net/bridge/br_stp_if.c ++++ linux-2.6.15.4/net/bridge/br_stp_if.c +@@ -67,7 +67,7 @@ void br_stp_disable_bridge(struct net_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_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); diff --git a/queue/series b/queue/series index a666e762c02..fd83a49c417 100644 --- a/queue/series +++ b/queue/series @@ -12,3 +12,4 @@ sys_signal-initialize-sa_mask.patch do_sigaction-cleanup-sa_mask-manipulation.patch sys32_signal-forgets-to-initialize-sa_mask.patch fix-s390-build-failure.patch +fix-deadlock-in-br_stp_disable_bridge.patch