mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
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>
This commit is contained in:
parent
7e80c12448
commit
168d40ee3d
1 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,7 @@ static void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
|
||||||
|
|
||||||
prev = NULL;
|
prev = NULL;
|
||||||
|
|
||||||
rp = br->router_list.first;
|
rp = rcu_dereference(br->router_list.first);
|
||||||
p = mdst ? mdst->ports : NULL;
|
p = mdst ? mdst->ports : NULL;
|
||||||
while (p || rp) {
|
while (p || rp) {
|
||||||
lport = p ? p->port : NULL;
|
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)
|
if ((unsigned long)lport >= (unsigned long)port)
|
||||||
p = p->next;
|
p = p->next;
|
||||||
if ((unsigned long)rport >= (unsigned long)port)
|
if ((unsigned long)rport >= (unsigned long)port)
|
||||||
rp = rp->next;
|
rp = rcu_dereference(rp->next);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!prev)
|
if (!prev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue