Skip to content

Commit e121d64

Browse files
lgebyungchulparkIngo Molnar
authored andcommitted
locking/lockdep: Introduce CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK=y
Add a Kconfig knob that enables the lockdep "crossrelease_fullstack" boot parameter. Suggested-by: Ingo Molnar <[email protected]> Signed-off-by: Byungchul Park <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 2dcd5ad commit e121d64

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

kernel/locking/lockdep.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ module_param(lock_stat, int, 0644);
7676
#define lock_stat 0
7777
#endif
7878

79+
#ifdef CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
80+
static int crossrelease_fullstack = 1;
81+
#else
7982
static int crossrelease_fullstack;
83+
#endif
8084
static int __init allow_crossrelease_fullstack(char *str)
8185
{
8286
crossrelease_fullstack = 1;

lib/Kconfig.debug

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,21 @@ config LOCKDEP_COMPLETIONS
11791179
A deadlock caused by wait_for_completion() and complete() can be
11801180
detected by lockdep using crossrelease feature.
11811181

1182+
config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
1183+
bool "Enable the boot parameter, crossrelease_fullstack"
1184+
depends on LOCKDEP_CROSSRELEASE
1185+
default n
1186+
help
1187+
The lockdep "cross-release" feature needs to record stack traces
1188+
(of calling functions) for all acquisitions, for eventual later
1189+
use during analysis. By default only a single caller is recorded,
1190+
because the unwind operation can be very expensive with deeper
1191+
stack chains.
1192+
1193+
However a boot parameter, crossrelease_fullstack, was
1194+
introduced since sometimes deeper traces are required for full
1195+
analysis. This option turns on the boot parameter.
1196+
11821197
config DEBUG_LOCKDEP
11831198
bool "Lock dependency engine debugging"
11841199
depends on DEBUG_KERNEL && LOCKDEP

0 commit comments

Comments
 (0)