/[linux-patches]/genpatches-2.6/trunk/2.6.14/1444_15.5_br_stp_disable_bridge-deadlock.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1444_15.5_br_stp_disable_bridge-deadlock.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations) (download) (as text)
Tue Mar 14 13:34:17 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1328 byte(s)
2.6.14-11, rebase against local tree
1 From: Adrian Drzewiecki <z@drze.net>
2 Date: Wed, 15 Feb 2006 09:47:48 +0000 (-0800)
3 Subject: [PATCH] Fix deadlock in br_stp_disable_bridge
4 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/chrisw/linux-2.6.15.y.git;a=commitdiff;h=f7cfcc72b365dc62cd01e1920f3f0b4e053f7735
5
6 [PATCH] Fix deadlock in br_stp_disable_bridge
7
8 Looks like somebody forgot to use the _bh spin_lock variant. We ran into a
9 deadlock where br->hello_timer expired while br_stp_disable_br() walked
10 br->port_list.
11
12 Signed-off-by: Adrian Drzewiecki <z@drze.net>
13 Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
15 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 ---
18
19 --- a/net/bridge/br_stp_if.c
20 +++ b/net/bridge/br_stp_if.c
21 @@ -67,7 +67,7 @@ void br_stp_disable_bridge(struct net_br
22 {
23 struct net_bridge_port *p;
24
25 - spin_lock(&br->lock);
26 + spin_lock_bh(&br->lock);
27 list_for_each_entry(p, &br->port_list, list) {
28 if (p->state != BR_STATE_DISABLED)
29 br_stp_disable_port(p);
30 @@ -76,7 +76,7 @@ void br_stp_disable_bridge(struct net_br
31
32 br->topology_change = 0;
33 br->topology_change_detected = 0;
34 - spin_unlock(&br->lock);
35 + spin_unlock_bh(&br->lock);
36
37 del_timer_sync(&br->hello_timer);
38 del_timer_sync(&br->topology_change_timer);

  ViewVC Help
Powered by ViewVC 1.1.20