From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33982 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726673AbeHXPnP (ORCPT ); Fri, 24 Aug 2018 11:43:15 -0400 From: David Howells In-Reply-To: References: <22614.1535039351@warthog.procyon.org.uk> <450873e0-2a8a-d757-4c68-f24e6a0466a1@jp.fujitsu.com> To: Misono Tomohiro Cc: dhowells@redhat.com, Qu Wenruo , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [PATCH] btrfs: ctree.h: Fix suspicious rcu usage warning in btrfs_debug_in_rcu() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Fri, 24 Aug 2018 13:08:51 +0100 Message-ID: <24038.1535112531@warthog.procyon.org.uk> Sender: linux-btrfs-owner@vger.kernel.org List-ID: Misono Tomohiro wrote: > commit 672d599041c8 ("btrfs: Use wrapper macro for rcu string to remove > duplicate code") replaces some open coded rcu string handling with macro. > > It turns out that btrfs_debug_in_rcu() is used for the first time and > the macro lacks lock/unlock of rcu string for non debug case > (i.e. when message is not printed), leading suspicious RCU usage warning > when CONFIG_PROVE_RCU is on. > > Fix this by adding a wrapper to call lock/unlock for non debug case too. > > Fixes: 672d599041c8 ("btrfs: Use wrapper macro for rcu string to remove > duplicate code") > Reported-by: David Howells > Signed-off-by: Misono Tomohiro Tested-by: David Howells