Skip to content

v6 add lockdep-based diagnostics to rcu_dereference()

Paul E. McKenney lkml 1 version Applied

Status from this message: I've applied them to tip:core/rcu, Thanks Paul!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 36 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/21rcu: introduce lockdep-based checking to RCU read-side primitivesinclude/linux/rcupdate.h include/linux/srcu.h kernel/rcupdate.c +4 more+267 -311 reply
2/21rcu: add lockdep-enabled variants of rcu_dereference()include/linux/rcupdate.h include/linux/srcu.h+42 -71 reply
3/21rcu: integrate rcu_dereference_check() message into lockdepinclude/linux/lockdep.h include/linux/rcupdate.h kernel/lockdep.c+24 -21 reply
4/21rcu: disable lockdep checking in RCU list-traversal primitivesinclude/linux/rculist.h include/linux/rculist_nulls.h+9 -91 reply
5/21net: add checking to rcu_dereference() primitivesinclude/linux/rtnetlink.h include/net/addrconf.h net/core/dev.c +6 more+35 -211 reply
6/21sched: use lockdep-based checking on rcu_dereference()include/linux/cgroup.h include/linux/cred.h init/main.c +6 more+43 -122 replies
7/21sched: better name for for_each_domain_rdkernel/sched.c+2 -21 reply
8/21vfs: apply lockdep-based checking to rcu_dereference() usesfs/file.c fs/proc/array.c fs/proc/base.c +1 more+14 -41 reply
9/21vfs: abstract rcu_dereference_check for files-fdtable useinclude/linux/fdtable.h+7 -41 reply
10/21radix-tree: disable RCU lockdep checking in radix treelib/radix-tree.c+12 -121 reply
11/21idr: apply lockdep-based diagnostics to rcu_dereference() useslib/idr.c+4 -41 reply
12/21security: apply lockdep-based checking to rcu_dereference() usessecurity/keys/gc.c security/keys/keyring.c+5 -21 reply
13/21rcu: documentation update for CONFIG_PROVE_RCUDocumentation/RCU/00-INDEX Documentation/RCU/checklist.txt Documentation/RCU/lockdep.txt +1 more+97 -191 reply
14/21rcu: fix citation of Mathieu's dissertationDocumentation/RCU/RTFP.txt+4 -11 reply
15/21rcu: accelerate grace period if last non-dynticked CPUinclude/linux/cpumask.h init/Kconfig kernel/rcutree.c +1 more+101 -31 reply
16/21rcu: use canonical URL for Mathieu's dissertationDocumentation/RCU/RTFP.txt+1 -11 reply
17/21rcu: stop overflowing signed integerskernel/rcutree.c kernel/rcutree.h kernel/rcutree_trace.c+30 -281 reply
18/21rcu: Convert to raw_spinlockskernel/rcutree.c kernel/rcutree.h kernel/rcutree_plugin.h+92 -921 reply
19/21rcu: fix deadlock in TREE_PREEMPT_RCU CPU stall detectionkernel/rcutree.c kernel/rcutree_plugin.h+2 -31 reply
20/21rcu: fix rcutorture mod_timer argument to delay one jiffykernel/rcutorture.c+1 -11 reply
21/21rcu: add RCU_CPU_STALL_VERBOSE to dump detailed per-task informationkernel/rcutree.c kernel/rcutree.h kernel/rcutree_plugin.h +1 more+69 -01 reply

Reviews trailers per patch

3 of 21 patches have a Reviewed-by or Acked-by.

PatchEric DumazetMathieu DesnoyersJohn KacurThomas GleixnerDavid S. Miller
1/21
2/21A-b A-b
3/21
4/21
5/21A-b A-b A-b A-b
6/21
7/21
8/21
9/21
10/21
11/21
12/21
13/21
14/21
15/21
16/21
17/21A-b A-b
18/21
19/21T-b T-b T-b Located-by T-b Located-by
20/21
21/21

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH tip/core/rcu 0/21] v6 add lockdep-based diagnostics to rcu_dereference()

Hello!

This patch series adds lockdep-based checking to the rcu_dereference() primitive in order to flag misuses of RCU. The first four patches put the RCU infrastructure in place, the next eight use this infrastructure in the net, sched, vfs, radix-tree, idr, and security subsystems, and patch 13 documents how to use the new lockdep-checked rcu_dereference() primitives. The remaining eight patches are other changes that also need to be applied, including some relatively urgent RCU_STALL patches.

The new (and default-disabled) CONFIG_PROVE_RCU makes this safe to include in tip/core/rcu -- unlike v2 and earlier, your system won't complain about RCU misuse unless you ask it to. There are still several situations that trigger on systems I have access to (and I have email out on a couple of them), some of the remaining will be triggered only by hardware I don't have access to and kernel features I am unfamiliar with. So this is ready for much wider testing.

Changes since v5 (http://lkml.org/lkml/2010/2/17/271)

o Fix a deadlock located by Thomas Gleixner that affects
TREE_PREEMPT_RCU in some CPU-stall detection scenarios.

o Add Dan Carpenter's cleanup to a mod_timer() in rcutorture.

o Add a RCU_CPU_STALL_VERBOSE to enable dumping more information
on tasks stalling the current RCU grace period.

o Applied Acked-by lines that people have sent (thank you all!).

Changes since v4 (http://lkml.org/lkml/2010/2/11/356)

o Apply review comments from Peter Ziljstra.

o Another documentation update.

o Fixes that avoid overflowing signed integers.

o Rebased Thomas Gleixner's raw-spinlock patch on this series.

	(Thomas's original at http://lkml.org/lkml/2010/2/17/182.)

Changes since v3 (http://lkml.org/lkml/2010/1/14/505)

o Fix a few more issues identified by the checking.

o Add a documentation update.

o Accelerate RCU grace periods when the current CPU is the last
non-dyntick-idle CPU in the system, which is important for some multi-core battery-powered devices.

Changes since v2 (http://lkml.org/lkml/2010/1/4/496):

o Removed references to the check condition for the non-lockdep
version of rcu_dereference_check(), thus preventing numerous build errors.

o Create a CONFIG_PROVE_RCU (default disabled) so that developers
who want to use lockdep only to debug locks aren't bothered by RCU-specific lockdep complaints that will no doubt persist for a little bit while some of the more obscure uses of RCU are reverse-engineered.

o Fix a few more issues identified by the checking.

o Add documentation in Documentation/RCU/lockdep.txt.

Changes since v1 (http://lkml.org/lkml/2009/12/15/553):

o Made SRCU have per-srcu_struct lockdep maps to prevent lockdep
from conflating independent uses of SRCU, and updated the rcu_dereference() checking in rcutorture to match.

o Fix a few issues identified by the checking.

o Disable checking within RCU list macros, RCU radix trees, and
IDR.