From: David Miller Subject: Re: [PATCH 1/5] net: remove bogus RCU annotations on socket.wq Date: Mon, 30 Jul 2018 09:09:29 -0700 (PDT) Message-ID: <20180730.090929.307167658012418290.davem@davemloft.net> References: <20180727140214.1938-2-hch@lst.de> <20180729.130551.870321755786430124.davem@davemloft.net> <20180730074454.GA10461@lst.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: hch@lst.de Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:60434 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726668AbeG3RpK (ORCPT ); Mon, 30 Jul 2018 13:45:10 -0400 In-Reply-To: <20180730074454.GA10461@lst.de> Sender: netdev-owner@vger.kernel.org List-ID: From: Christoph Hellwig Date: Mon, 30 Jul 2018 09:44:54 +0200 > On Sun, Jul 29, 2018 at 01:05:51PM -0700, David Miller wrote: >> From: Christoph Hellwig >> Date: Fri, 27 Jul 2018 16:02:10 +0200 >> >> > We never use RCU protection for it, just a lot of cargo-cult >> > rcu_deference_protects calls. >> > >> > Note that we do keep the kfree_rcu call for it, as the references through >> > struct sock are RCU protected and thus might require a grace period before >> > freeing. >> > >> > Signed-off-by: Christoph Hellwig >> >> These were added by Eric Dumazet and I would never accuse him of cargo >> cult programming. >> >> All of the rcu_dereference_protects() calls are legit, even though some >> of them use '1' as the protects condition because in fact we know the >> object is dead and gone through an RCU cycle at that point. > > I disagree, but I'll resend it the patch with Eric and Paul in CC to > settle the argument. Thank you.