Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6588782ybl; Wed, 15 Jan 2020 07:06:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzswjT+zBb9SHzhOF9Hw6Y7XWxIvpDwkSXbVKOxdhXkEWzSqj4S4da31rfJFCsa75Z+Jmxm X-Received: by 2002:a9d:60c4:: with SMTP id b4mr3108989otk.166.1579100791659; Wed, 15 Jan 2020 07:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579100791; cv=none; d=google.com; s=arc-20160816; b=zrbCyvRICujqEaI+1GmCYCdK4gkbVRx6PTWWl6EoXIXjztswzhZerhbzlVGixPQ31L i0OCzOsOiaBVcxdaGWw50mHpGVoD6XMSUpdoUKzz0yYStgtKN1lAnDT9OfzrMDZ4y3oq F6IryTxcxh1KfU3PKErEJjw5dce7AR4VSLZpRCiUlzgxL3/+722JrQLR0984duqQz9Mr xw0vAFoO5LDksD8eng9OBqspeQdee2W6Wcv4Z2m6S2E7ZMfGx8AS7J47ll24Jp2cqqge +UbvJ2buBbWNO8yNdKE/sXhc876MMjq0KpIZHnmQCv1VoMwOxOLnxIqCdPg2g/yzYLHT zBMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xQvK3Khfh8ssHY6UKXAmXLE4MXakJFMEfTNk2HuT3e8=; b=mhYAUKch5QpkC2X8kTYB98VuJdd6+lL0WZ5GxzLXooVQ6IdFddHLAmGl9h+i/qGmci QHZFC1+ERIKNRvt3kpKMTGJETxaK5xMNRbwJ6yzxhx0YbCqkwrutuaWJOt9SHtmU9RLy 134n8RA6DfTwTlEZNdvJpEPXh0zImSG9Hrjy9T8uLEV8Um4+wWemjqumg+jyG8oVluXt raNNV3ve82cX1g+NdAAZvPx0IGTf0Wc27KgzZ7bMBtLDZQ1H3jTRBjBBMsq2fe07LkHa y59ay6gF6afCAkkN9ZxTL3SsOHqkfR7YW1y5a8Pb9UY51hGS1YtUm9eItDcOm3YB3NuJ y9Yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si11060248otq.23.2020.01.15.07.06.19; Wed, 15 Jan 2020 07:06:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729236AbgAOPEc (ORCPT + 99 others); Wed, 15 Jan 2020 10:04:32 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38577 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729011AbgAOPEc (ORCPT ); Wed, 15 Jan 2020 10:04:32 -0500 Received: by mail-wm1-f68.google.com with SMTP id u2so200942wmc.3; Wed, 15 Jan 2020 07:04:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xQvK3Khfh8ssHY6UKXAmXLE4MXakJFMEfTNk2HuT3e8=; b=WGZFfxHNGxkn3qKiGXNyQWIkmR6gZtBOh5T54Ma6DLnAgmyCGoTkrObkQbpbFZqMlO eSfMJg5THDN1axPJZo0QLmYOVFL+9TQ8SVTwzrq9pk6guLbN8wqAi6f6UUvitygc79Uc 0asMaM5hCAG9Ei7rLJ0AGJTO4M1OvvpNbe7+d5iJHdOQWz/5Hamim+9DcLrDRFD7iXSP lJB2SvafIqMd7nJuDHW0VqJQPK6PkytVDkbhuFh9JofDC9Zj5nq6fq+U3JfdMQzC4kDi gDQhAzaOFkXaTQBsq4v7l9sdWA5/+svsLZd8FKdxvtashccRiMYZlDjgmyeGTmAqSngR 27Ag== X-Gm-Message-State: APjAAAU7OxYUn+YDvFqMamo+fti/c3MbPHgVE12IHE7i3KxDHm7S9r4j jRWZ08J5I0pWwGng9XlVJ8I= X-Received: by 2002:a1c:2187:: with SMTP id h129mr244143wmh.44.1579100669759; Wed, 15 Jan 2020 07:04:29 -0800 (PST) Received: from debian (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id b137sm133936wme.26.2020.01.15.07.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 07:04:28 -0800 (PST) Date: Wed, 15 Jan 2020 15:04:26 +0000 From: Wei Liu To: Madhuparna Bhowmik Cc: Wei Liu , paul@xen.org, davem@davemloft.net, xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul E. McKenney" , Joel Fernandes , Amol Grover , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH] net: xen-netbank: hash.c: Use built-in RCU list checking Message-ID: <20200115150426.svapzpux2tbbgvmn@debian> References: <20200115124129.5684-1-madhuparnabhowmik04@gmail.com> <20200115135631.edr2nrfkycppxcku@debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 15, 2020 at 07:36:38PM +0530, Madhuparna Bhowmik wrote: [...] > > > The surrounding code makes it pretty clear that the lock is already held > > by the time list_for_each_entry_rcu is called, yet the checking involved > > in lockdep_is_held is not trivial, so I'm afraid I don't consider this a > > strict improvement over the existing code. > > > > Actually, we want to make CONFIG_PROVE_LIST_RCU enabled by default. I think you meant CONFIG_PROVE_RCU_LIST. > And if the cond argument is not passed when the usage of > list_for_each_entry_rcu() > is outside of rcu_read_lock(), it will lead to a false positive. > Therefore, I think this patch is required. Fair enough. Wei.