[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100427.162811.233419535.davem@davemloft.net>
Date: Tue, 27 Apr 2010 16:28:11 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: shemminger@...tta.com
Cc: mirqus@...il.com, herbert@...dor.apana.org.au,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] bridge: multicast router list manipulation
From: Stephen Hemminger <shemminger@...tta.com>
Date: Tue, 27 Apr 2010 16:25:30 -0700
> On Wed, 28 Apr 2010 01:11:52 +0200
> Michał Mirosław <mirqus@...il.com> wrote:
>
>> 2010/4/27 Stephen Hemminger <shemminger@...tta.com>:
>> > 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
But the adds et al. use RCU already, I think we should be consistent
one way or another.
I've already made Michał's suggested change to net-next-2.6, if you
think _rcu() isn't necessary then trim it from all the hlist calls
in this function.
Powered by blists - more mailing lists