Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1600346ybf; Sun, 1 Mar 2020 13:23:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwfenyaYUKcy+Agf+oamC3gSmBrQpeGjNfRaAUn1I/iDtNT2NswYZ84Gu1jIoQgi+2+PeDw X-Received: by 2002:a54:468b:: with SMTP id k11mr9286862oic.134.1583097828813; Sun, 01 Mar 2020 13:23:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583097828; cv=none; d=google.com; s=arc-20160816; b=FZLEIMOnPZ8JJYBTjYmnQZR8njLwFNfkwRQhxFhms2ywyMJL6hqCnU7fDvnlQ0UQlm 53rKd/l27eLDs6R9fp2KgroIbsVAifAmD9r7/5OSHM88P+EsfrXwoZij4q9xTFJQbo6+ 12Qev7D79gsbmy3/JZrXGBLu40J8/p1CcmcI8mCDc/uouml8b8fyHzMMW601fFNwPu14 pl3A07eJ1bPaNKxBZTMIta4n6N+5p5i8ftalBNSihD0xD89v87LohuMeotTwM7HJ5R4A N6Kk5uJDzPfzwCzk8ihFcIZ9OpDhIe68DNeoWzZoqDPtVJWRFGp7ov+It+iUL6rPfif4 1hIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=g90Jsy31XrppfqU2qdwvAKX4AQi5k+8zFJzl7y6CTO8=; b=NxO/phah68sbrAj7PK+umZKETenueNnmakl918keaK92FIKAgdXfa0Rl7N173nhaYC poa1rhHbOpd3a7OKqGGT57mGC2Kw0OM9mFq4n0pM4h4Rqt8ojlngiMNm1lOuN3QthI+L 7esavH7GnhWQLDjVOxpewPTAEIlp62ZIWPpf7+ZwYTLxRq1rTaarpDgVJgXE1wJdolL7 l5v+GCKpfI6l0eBnu1gbiejY8HFSdqyWKQUDdDru/bBvkjqyOk1kxbA5YqjLNpAReNMr vQ3j/Zm3w3nhLM8i0xrR0gGqGARRJCNm7eoHKAxHui20CDD4KNep1aQ5zpCi2npqmlVo D0Bg== 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 n1si2066988oig.237.2020.03.01.13.23.36; Sun, 01 Mar 2020 13:23:48 -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 S1726562AbgCAVXT (ORCPT + 99 others); Sun, 1 Mar 2020 16:23:19 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:44308 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726465AbgCAVXS (ORCPT ); Sun, 1 Mar 2020 16:23:18 -0500 Received: by mail-oi1-f193.google.com with SMTP id d62so8357570oia.11; Sun, 01 Mar 2020 13:23:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g90Jsy31XrppfqU2qdwvAKX4AQi5k+8zFJzl7y6CTO8=; b=hpqnu07zFA3Uke2RMN5J3KIoXQHeR5VtJcuge9sJYzpib0EgJmQMvA1lYUmqbK3FBI kKif4O9kcKlAVsv3MOzdHiFQzi19/ON+4JYm3DBUD8gaSiNxvOoWYCc/ayZtkmlfnqAm 2GCHO9qnKohEpFb2Ez0H8s8oaaRhVNc4aA9ZvtFfk3fVno69l2JASjpAoVuIbS42eydb wdBJT2fRMOWudKEMhfE3eSKqbLufyhoNbhkzq+PlAxToZMCfmGrg0gFpw6eHhb/OYgEL Ewgc5+5rdfhDxhyVmvEWTcwppcYzSDvHmQevv2HXXlfWft9q37ydH2i3gQYOpmtFQ59A 1Fgw== X-Gm-Message-State: APjAAAXRDXWlXJV0uhoX9vtg7QM5r727EEzrod6M2vG4sPmIFZhRTmdn HaCypxfZ+FCvoqfwVQghd9u+/S2Yhy7Q1KswxhM= X-Received: by 2002:aca:ebcf:: with SMTP id j198mr8056491oih.115.1583097798061; Sun, 01 Mar 2020 13:23:18 -0800 (PST) MIME-Version: 1.0 References: <20200228174630.8989-1-madhuparnabhowmik10@gmail.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Sun, 1 Mar 2020 22:23:07 +0100 Message-ID: Subject: Re: [PATCH 1/2] drivers: base: power: main: Use built-in RCU list checking To: Joel Fernandes Cc: "Rafael J. Wysocki" , madhuparnabhowmik10@gmail.com, "Rafael J. Wysocki" , Pavel Machek , Len Brown , Greg Kroah-Hartman , Linux PM , Linux Kernel Mailing List , frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, paulmck@kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 1, 2020 at 9:53 PM wrote: > > > > On March 1, 2020 3:12:53 PM EST, "Rafael J. Wysocki" wrote: > >On Fri, Feb 28, 2020 at 6:47 PM wrote: > >> > >> From: Madhuparna Bhowmik > >> > >> This patch passes the cond argument to list_for_each_entry_rcu() > >> to fix the following false-positive lockdep warnings: > >> > >> [ 330.302784] ============================= > >> [ 330.302789] WARNING: suspicious RCU usage > >> [ 330.302796] 5.6.0-rc1+ #5 Not tainted > >> [ 330.302801] ----------------------------- > >> [ 330.302808] drivers/base/power/main.c:326 RCU-list traversed in > >non-reader section!! > >> > >> [ 330.303303] ============================= > >> [ 330.303307] WARNING: suspicious RCU usage > >> [ 330.303311] 5.6.0-rc1+ #5 Not tainted > >> [ 330.303315] ----------------------------- > >> [ 330.303319] drivers/base/power/main.c:1698 RCU-list traversed in > >non-reader section!! > >> > >> [ 331.934969] ============================= > >> [ 331.934971] WARNING: suspicious RCU usage > >> [ 331.934973] 5.6.0-rc1+ #5 Not tainted > >> [ 331.934975] ----------------------------- > >> [ 331.934977] drivers/base/power/main.c:1238 RCU-list traversed in > >non-reader section!! > >> > >> [ 332.467772] WARNING: suspicious RCU usage > >> [ 332.467775] 5.6.0-rc1+ #5 Not tainted > >> [ 332.467775] ----------------------------- > >> [ 332.467778] drivers/base/power/main.c:269 RCU-list traversed in > >non-reader section!! > > > >I don't see these warnings in the kernels run locally here. > > > >What do you do to get them? > > > >Joel, any comments here? > > You have to enable lockdep in your config. Does your setup have that? CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_LOCKDEP=y Anything else?