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>
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;
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)