[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19436.1467303739@warthog.procyon.org.uk>
Date: Thu, 30 Jun 2016 17:22:19 +0100
From: David Howells <dhowells@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: dhowells@...hat.com, davem@...emloft.net, netdev@...r.kernel.org,
linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 19/19] rxrpc: Use RCU to access a peer's service connection tree
Peter Zijlstra <peterz@...radead.org> wrote:
> > + if (conn->proto.index_key < k.index_key)
> > + p = p->rb_left;
> > + else if (conn->proto.index_key > k.index_key)
> > + p = p->rb_right;
>
> You still very much need rcu_dereference() for both left and right
> pointers. As well as the first p load.
Bah... Yes. Good point.
> > + rb_link_node(&conn->service_node, parent, pp);
>
> You want rb_link_node_rcu() here.
Should there be an rb_replace_node_rcu() also?
David
Powered by blists - more mailing lists