Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp388772ybf; Thu, 27 Feb 2020 23:37:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyBkbeekbtKK7GmtXWG1gPJMNSsIe9SEf7ZwPcQAhm4au4B+vB1jeHDfS0XgXe9umGQRbh0 X-Received: by 2002:a9d:6a2:: with SMTP id 31mr2168778otx.313.1582875454105; Thu, 27 Feb 2020 23:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582875454; cv=none; d=google.com; s=arc-20160816; b=NNMXcaa1H9u4LZPC1PHr0XRuMogZuDxb5d1UsEx8L+8H213aZRKvsU4qsWa2bTZRIM +eQH6euRoysw2KK2js152F6KPcT0Fs5WfFZQs+7knwsl00D0W0cFX5KCFn2PY7jtd8UX gHw6utmsVmNuHMwctoNL+Haz/YPubKe63FfNbmeCGu71eixOt0LSHyX5Akce6dtwzLT3 tZrDe1sNJua8l0Eu8Hkzsqvp1NgdxtMdjgKLn2yk/fmb40eSystatHPODSR3iO61c6NM NL58o1phdW8VZ5kiPf/obnIWyjpP1wtWre09d9GW6Yw9DCcOSPPGoTpe936JoC9booRO AA5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=AUdumDdGCMMKZObLvP/Lh4rRO9DrWHrlcN3VCKURNdI=; b=hUS8Qf2hsnHSOY3VicpbqFYg0SxO7E3Zm5lcbiFblw3ge4Yv8dbF/uXg7E+Jv0yjzh LPDlFbLxVO7/rAGSs8I2imwQHl1D5913A88ueOCtH2zdE8Mj6TJ1oXA0GFIqIxOwkd+l lBFf9uahQAm9+Ez6l+M/cDlZaHsOrg678Qk060Hmyv0TrxU1Wa6LLRma3DnyfPUrqp+C HPhWG0bie3WmHfFbJo9X0iBNm+DerBQ2DWd+1V9p6CY5SAX8XvwrGbuSpdVUa2qJHl/X WjFwsbG5YYPVwBheBJsCeftTJuJXofr3bWuqt1+Y7YT7YA4ByCKQ3HD+oqXu0DbGo8O9 kh4A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si1066812otm.165.2020.02.27.23.37.21; Thu, 27 Feb 2020 23:37:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbgB1HhF convert rfc822-to-8bit (ORCPT + 99 others); Fri, 28 Feb 2020 02:37:05 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:33704 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbgB1HhE (ORCPT ); Fri, 28 Feb 2020 02:37:04 -0500 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 90990CECF6; Fri, 28 Feb 2020 08:46:29 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: [PATCH] net: bluetooth: hci_core: Fix Suspicious RCU usage warnings From: Marcel Holtmann In-Reply-To: <20200225130809.32750-1-madhuparnabhowmik10@gmail.com> Date: Fri, 28 Feb 2020 08:37:03 +0100 Cc: Johan Hedberg , "David S. Miller" , kuba@kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, joel@joelfernandes.org, linux-kernel-mentees@lists.linuxfoundation.org, frextrite@gmail.com, paulmck@kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <182A4E2D-86AB-4C81-8ACB-AC8033BAFDE3@holtmann.org> References: <20200225130809.32750-1-madhuparnabhowmik10@gmail.com> To: madhuparnabhowmik10@gmail.com X-Mailer: Apple Mail (2.3608.60.0.2.5) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Madhuparna, > The following functions in hci_core are always called with > hdev->lock held. No need to use list_for_each_entry_rcu(), therefore > change the usage of list_for_each_entry_rcu() in these functions > to list_for_each_entry(). > > hci_link_keys_clear() > hci_smp_ltks_clear() > hci_smp_irks_clear() > hci_blocked_keys_clear() > > Warning encountered with CONFIG_PROVE_RCU_LIST: > > [ 72.213184] ============================= > [ 72.213188] WARNING: suspicious RCU usage > [ 72.213192] 5.6.0-rc1+ #5 Not tainted > [ 72.213195] ----------------------------- > [ 72.213198] net/bluetooth/hci_core.c:2288 RCU-list traversed in non-reader section!! > > [ 72.213676] ============================= > [ 72.213679] WARNING: suspicious RCU usage > [ 72.213683] 5.6.0-rc1+ #5 Not tainted > [ 72.213685] ----------------------------- > [ 72.213689] net/bluetooth/hci_core.c:2298 RCU-list traversed in non-reader section!! > > [ 72.214195] ============================= > [ 72.214198] WARNING: suspicious RCU usage > [ 72.214201] 5.6.0-rc1+ #5 Not tainted > [ 72.214204] ----------------------------- > [ 72.214208] net/bluetooth/hci_core.c:2308 RCU-list traversed in non-reader section!! > > [ 333.456972] ============================= > [ 333.456979] WARNING: suspicious RCU usage > [ 333.457001] 5.6.0-rc1+ #5 Not tainted > [ 333.457007] ----------------------------- > [ 333.457014] net/bluetooth/hci_core.c:2318 RCU-list traversed in non-reader section!! > > Signed-off-by: Madhuparna Bhowmik > --- > net/bluetooth/hci_core.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel