Skip to content

Commit 15ea86b

Browse files
bvanasscheingomolnar
authored andcommitted
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: ca58abc ("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>
1 parent 7ff8517 commit 15ea86b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/locking/lockdep.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4270,10 +4270,11 @@ void __init lockdep_init(void)
42704270
(sizeof(lock_classes) +
42714271
sizeof(classhash_table) +
42724272
sizeof(list_entries) +
4273-
sizeof(lock_chains) +
42744273
sizeof(chainhash_table)
42754274
#ifdef CONFIG_PROVE_LOCKING
42764275
+ sizeof(lock_cq)
4276+
+ sizeof(lock_chains)
4277+
+ sizeof(chain_hlocks)
42774278
#endif
42784279
) / 1024
42794280
);

0 commit comments

Comments
 (0)