From: Chris Wright Date: Wed, 12 Oct 2005 23:14:46 +0000 (-0700) Subject: Add bridge fix from Steve Hemminger X-Git-Tag: v2.6.14.1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbdb11fe3cfef568d19e97b0601e74d0d5e67880;p=thirdparty%2Fkernel%2Fstable-queue.git Add bridge fix from Steve Hemminger --- diff --git a/queue/br-fix-race-on-bridge-del-if.patch b/queue/br-fix-race-on-bridge-del-if.patch new file mode 100644 index 00000000000..559bde98629 --- /dev/null +++ b/queue/br-fix-race-on-bridge-del-if.patch @@ -0,0 +1,42 @@ +From shemminger@osdl.org Tue Oct 11 13:37:00 2005 +Date: Tue, 11 Oct 2005 13:33:28 -0700 +From: Stephen Hemminger +To: Ryan Harper , "David S. Miller" +Cc: netdev@oss.sgi.com, Chris Wright , Greg KH +Subject: [PATCH] br: fix race on bridge del if + +This fixes the RCU race on bridge delete interface. Basically, +the network device has to be detached from the bridge in the first +step (pre-RCU), rather than later. At that point, no more bridge traffic +will come in, and the other code will not think that network device +is part of a bridge. + +This should also fix the XEN test problems. If there is another +2.6.13-stable, add it as well. + +Signed-off-by: Stephen Hemminger +Signed-off-by: Chris Wright +--- + net/bridge/br_if.c | 2 +- + 1 files changed, 1 insertion(+), 1 deletion(-) + +Index: linux-2.6.13.y/net/bridge/br_if.c +=================================================================== +--- linux-2.6.13.y.orig/net/bridge/br_if.c ++++ linux-2.6.13.y/net/bridge/br_if.c +@@ -79,7 +79,6 @@ static void destroy_nbp(struct net_bridg + { + struct net_device *dev = p->dev; + +- dev->br_port = NULL; + p->br = NULL; + p->dev = NULL; + dev_put(dev); +@@ -100,6 +99,7 @@ static void del_nbp(struct net_bridge_po + struct net_bridge *br = p->br; + struct net_device *dev = p->dev; + ++ dev->br_port = NULL; + dev_set_promiscuity(dev, -1); + + spin_lock_bh(&br->lock); diff --git a/queue/series b/queue/series index a7ffc949480..79f17108d92 100644 --- a/queue/series +++ b/queue/series @@ -1 +1,2 @@ sparc64-build-fix.patch +br-fix-race-on-bridge-del-if.patch