diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2019-02-14 18:00:38 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2019-02-28 01:55:39 -0500 |
| commit | 15ea86b58c71d05e0921bebcf707aa30e43e9e25 (patch) | |
| tree | 922af48bee76f0986d4dc24dde9c3d9db2a8b5a0 /kernel/locking | |
| parent | 7ff8517e1034f26dde03d6df4026f085480408f0 (diff) | |
locking/lockdep: Fix reported required memory size (2/2)
Lock chains are only tracked with CONFIG_PROVE_LOCKING=y. Do not report
the memory required for the lock chain array if CONFIG_PROVE_LOCKING=n.
See also commit:
ca58abcb4a6d ("lockdep: sanitise CONFIG_PROVE_LOCKING")
Include the size of the chain_hlocks[] array.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: johannes.berg@intel.com
Cc: tj@kernel.org
Link: https://lkml.kernel.org/r/20190214230058.196511-4-bvanassche@acm.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking')
| -rw-r--r-- | kernel/locking/lockdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 57a523f0273c..ec6f6aff4d8d 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c | |||
| @@ -4270,10 +4270,11 @@ void __init lockdep_init(void) | |||
| 4270 | (sizeof(lock_classes) + | 4270 | (sizeof(lock_classes) + |
| 4271 | sizeof(classhash_table) + | 4271 | sizeof(classhash_table) + |
| 4272 | sizeof(list_entries) + | 4272 | sizeof(list_entries) + |
| 4273 | sizeof(lock_chains) + | ||
| 4274 | sizeof(chainhash_table) | 4273 | sizeof(chainhash_table) |
| 4275 | #ifdef CONFIG_PROVE_LOCKING | 4274 | #ifdef CONFIG_PROVE_LOCKING |
| 4276 | + sizeof(lock_cq) | 4275 | + sizeof(lock_cq) |
| 4276 | + sizeof(lock_chains) | ||
| 4277 | + sizeof(chain_hlocks) | ||
| 4277 | #endif | 4278 | #endif |
| 4278 | ) / 1024 | 4279 | ) / 1024 |
| 4279 | ); | 4280 | ); |
