summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-04-27 17:01:05 +0200
committerDavid S. Miller <davem@davemloft.net>2010-04-28 03:13:54 +0200
commit168d40ee3d147ae20860e7916bd79b636cbe8fd5 (patch)
tree533403c281c8d397d7c061fc295f4d2b07dfaa0c
parentbridge: simplify multicast_add_router (diff)
downloadlinux-168d40ee3d147ae20860e7916bd79b636cbe8fd5.tar.xz
linux-168d40ee3d147ae20860e7916bd79b636cbe8fd5.zip
bridge: multicast flood
Fix unsafe usage of RCU. Would never work on Alpha SMP because of lack of rcu_dereference() Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/bridge/br_forward.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index 7a241c396981..5b70fc012e40 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -216,7 +216,7 @@ static void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
prev = NULL;
- rp = br->router_list.first;
+ rp = rcu_dereference(br->router_list.first);
p = mdst ? mdst->ports : NULL;
while (p || rp) {
lport = p ? p->port : NULL;
@@ -233,7 +233,7 @@ static void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
if ((unsigned long)lport >= (unsigned long)port)
p = p->next;
if ((unsigned long)rport >= (unsigned long)port)
- rp = rp->next;
+ rp = rcu_dereference(rp->next);
}
if (!prev)