diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-04-27 11:01:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-27 21:13:54 -0400 |
commit | 168d40ee3d147ae20860e7916bd79b636cbe8fd5 (patch) | |
tree | 533403c281c8d397d7c061fc295f4d2b07dfaa0c /net/bridge | |
parent | 7e80c124485b73146deadce14fd4da2054581806 (diff) |
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>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_forward.c | 4 |
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, | |||
216 | 216 | ||
217 | prev = NULL; | 217 | prev = NULL; |
218 | 218 | ||
219 | rp = br->router_list.first; | 219 | rp = rcu_dereference(br->router_list.first); |
220 | p = mdst ? mdst->ports : NULL; | 220 | p = mdst ? mdst->ports : NULL; |
221 | while (p || rp) { | 221 | while (p || rp) { |
222 | lport = p ? p->port : NULL; | 222 | lport = p ? p->port : NULL; |
@@ -233,7 +233,7 @@ static void br_multicast_flood(struct net_bridge_mdb_entry *mdst, | |||
233 | if ((unsigned long)lport >= (unsigned long)port) | 233 | if ((unsigned long)lport >= (unsigned long)port) |
234 | p = p->next; | 234 | p = p->next; |
235 | if ((unsigned long)rport >= (unsigned long)port) | 235 | if ((unsigned long)rport >= (unsigned long)port) |
236 | rp = rp->next; | 236 | rp = rcu_dereference(rp->next); |
237 | } | 237 | } |
238 | 238 | ||
239 | if (!prev) | 239 | if (!prev) |