Re: [PATCH] Default enable RCU list lockdep debugging with PROVE_RCU

From: Madhuparna Bhowmik
Date: Thu Mar 05 2020 - 12:40:05 EST


On Thu, Mar 05, 2020 at 07:52:38AM -0800, Guenter Roeck wrote:
> On Fri, Feb 28, 2020 at 02:54:51PM +0530, madhuparnabhowmik10@xxxxxxxxx wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik10@xxxxxxxxx>
> >
> > This patch default enables CONFIG_PROVE_RCU_LIST option with
> > CONFIG_PROVE_RCU for RCU list lockdep debugging.
> >
> > With this change, RCU list lockdep debugging will be default
> > enabled in CONFIG_PROVE_RCU=y kernels.
> >
> > Most of the RCU users (in core kernel/, drivers/, and net/
> > subsystem) have already been modified to include lockdep
> > expressions hence RCU list debugging can be enabled by
> > default.
> >
> > However, there are still chances of enountering
> > false-positive lockdep splats because not everything is converted,
> > in case RCU list primitives are used in non-RCU read-side critical
> > section but under the protection of a lock. It would be okay to
> > have a few false-positives, as long as bugs are identified, since this
> > patch only affects debugging kernels.
> >
> > Co-developed-by: Amol Grover <frextrite@xxxxxxxxx>
> > Signed-off-by: Amol Grover <frextrite@xxxxxxxxx>
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@xxxxxxxxx>
>
> Who is going to fix the fallout ?
>
> fs/btrfs/block-group.c:2011 RCU-list traversed in non-reader section!!
> kernel/kprobes.c:329 RCU-list traversed in non-reader section!!
> net/ipv4/ipmr.c:136 RCU-list traversed in non-reader section!!
>
Hi,
There is already a patch for fixing the warnings in kernel/kprobes.c :
https://lore.kernel.org/lkml/157905963533.2268.4672153983131918123.stgit@devnote2/

Same for net/ipv4/ipmr:
https://lore.kernel.org/patchwork/patch/1198934/

Can you please send the warning with the stack backtrace and locks held
for btrfs/block-group.c, I will work on it.

Thank you,
Madhuparna
> This is just from my boot tests. I'll keep PROVE_RCU enabled for the
> time being, but unless the noise is addressed I'll have to disable it
> because otherwise the real problems disappear in the noise.
>
> Guenter