Subject: Re: [PATCH net-next] bridge: multicast router list manipulation

From: Stephen Hemminger <[email-masked]>
Date: Tue, 27 Apr 2010 16:25:30 -0700

On Wed, 28 Apr 2010 01:11:52 +0200
Michał Mirosław <[email-masked]> wrote:

> 2010/4/27 Stephen Hemminger <[email-masked]>:
> > I prefer that the hlist be only accessed through the hlist macro
> > objects. Explicit twiddling of links (especially with RCU) exposes
> > the code to future bugs.
> [...]
> > -       port->rlist.pprev = h;
> > -       port->rlist.next = p;
> > -       rcu_assign_pointer(*h, &port->rlist);
> > -       if (p)
> > -               p->pprev = &port->rlist.next;
> > +       hlist_for_each_entry(p, n, &br->router_list, rlist) {
> 
> Shouldn't this be hlist_for_each_entry_rcu?
> 

This code should already be protected by br->multicast_lock