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

From: Guenter Roeck
Date: Thu Mar 05 2020 - 10:52:43 EST


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!!

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