[PATCH net-next 19/19] rxrpc: Use RCU to access a peer's service connection tree
David Howells
dhowells at redhat.com
Thu Jun 30 09:22:19 PDT 2016
Peter Zijlstra <peterz at infradead.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
More information about the linux-afs
mailing list