From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965389AbbLRV1e (ORCPT ); Fri, 18 Dec 2015 16:27:34 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:45851 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964992AbbLRV1d (ORCPT ); Fri, 18 Dec 2015 16:27:33 -0500 Date: Fri, 18 Dec 2015 16:27:31 -0500 (EST) Message-Id: <20151218.162731.305092674804556753.davem@davemloft.net> To: herbert@gondor.apana.org.au Cc: eric.dumazet@gmail.com, ying.huang@linux.intel.com, lkp@01.org, linux-kernel@vger.kernel.org, colin.king@canonical.com, fengguang.wu@intel.com, netdev@vger.kernel.org Subject: Re: rhashtable: Kill harmless RCU warning in rhashtable_walk_init From: David Miller In-Reply-To: <20151218131408.GA21756@gondor.apana.org.au> References: <20151218062450.GA19749@gondor.apana.org.au> <1450443254.8474.120.camel@edumazet-glaptop2.roam.corp.google.com> <20151218131408.GA21756@gondor.apana.org.au> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 18 Dec 2015 13:27:32 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Herbert Xu Date: Fri, 18 Dec 2015 21:14:08 +0800 > On Fri, Dec 18, 2015 at 04:54:14AM -0800, Eric Dumazet wrote: >> >> You can avoid the comment by using the self documented and lockdep >> enabled primitive >> >> iter->walker->tbl = rcu_dereference_protected(ht->tbl, >> lockdep_is_held(&ht->lock)); > > That is just gross. I think a comment is much better in this case. Herbert, this macro was created exactly to handle this situation, and this is what we do everywhere else in the tree. Please use it. Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3333625806859405911==" MIME-Version: 1.0 From: David Miller To: lkp@lists.01.org Subject: Re: rhashtable: Kill harmless RCU warning in rhashtable_walk_init Date: Fri, 18 Dec 2015 16:27:31 -0500 Message-ID: <20151218.162731.305092674804556753.davem@davemloft.net> In-Reply-To: <20151218131408.GA21756@gondor.apana.org.au> List-Id: --===============3333625806859405911== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Herbert Xu Date: Fri, 18 Dec 2015 21:14:08 +0800 > On Fri, Dec 18, 2015 at 04:54:14AM -0800, Eric Dumazet wrote: >> >> You can avoid the comment by using the self documented and lockdep >> enabled primitive >> = >> iter->walker->tbl =3D rcu_dereference_protected(ht->tbl, >> lockdep_is_held(&ht->lock)); > = > That is just gross. I think a comment is much better in this case. Herbert, this macro was created exactly to handle this situation, and this is what we do everywhere else in the tree. Please use it. Thanks. --===============3333625806859405911==--