From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932665AbcF3QWZ (ORCPT ); Thu, 30 Jun 2016 12:22:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45772 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932109AbcF3QWW (ORCPT ); Thu, 30 Jun 2016 12:22:22 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20160630153049.GG30935@twins.programming.kicks-ass.net> References: <20160630153049.GG30935@twins.programming.kicks-ass.net> <146729584148.26306.13038965408565743258.stgit@warthog.procyon.org.uk> <146729597856.26306.17024362508555652794.stgit@warthog.procyon.org.uk> To: Peter Zijlstra Cc: dhowells@redhat.com, davem@davemloft.net, netdev@vger.kernel.org, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 19/19] rxrpc: Use RCU to access a peer's service connection tree MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19435.1467303739.1@warthog.procyon.org.uk> Date: Thu, 30 Jun 2016 17:22:19 +0100 Message-ID: <19436.1467303739@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 30 Jun 2016 16:22:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra 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