]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fix deadlock in br_stp_disable_bridge, fwd from shemminger
authorChris Wright <chrisw@sous-sol.org>
Thu, 16 Feb 2006 08:20:39 +0000 (00:20 -0800)
committerChris Wright <chrisw@sous-sol.org>
Thu, 16 Feb 2006 08:20:39 +0000 (00:20 -0800)
queue/fix-deadlock-in-br_stp_disable_bridge.patch [new file with mode: 0644]
queue/series

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 (file)
index 0000000..31ac4db
--- /dev/null
@@ -0,0 +1,38 @@
+From nobody Mon Sep 17 00:00:00 2001
+From: Adrian Drzewiecki <z@drze.net>
+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 <z@drze.net>
+Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+ 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);
index a666e762c029b3b3d0162b2ab81c0a81c15d5bea..fd83a49c417ce2f73e36ddc441e0b8dca09dec94 100644 (file)
@@ -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