Messages in this thread Patch in this message | | | From | Bart Van Assche <> | Subject | [PATCH v5 01/15] locking/lockdep: Fix required memory size reported if CONFIG_PROVE_LOCKING=n | Date | Mon, 17 Dec 2018 13:29:48 -0800 |
| |
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.
Fixes: ca58abcb4a6d ("lockdep: sanitise CONFIG_PROVE_LOCKING") # v2.6.23 Cc: Peter Zijlstra <peterz@infradead.org> Cc: Waiman Long <longman@redhat.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 5c837a537273..6b89fc39fcf0 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -4282,9 +4282,9 @@ void __init lockdep_init(void) (sizeof(struct lock_class) * MAX_LOCKDEP_KEYS + sizeof(struct list_head) * CLASSHASH_SIZE + sizeof(struct lock_list) * MAX_LOCKDEP_ENTRIES + - sizeof(struct lock_chain) * MAX_LOCKDEP_CHAINS + sizeof(struct list_head) * CHAINHASH_SIZE #ifdef CONFIG_PROVE_LOCKING + + sizeof(struct lock_chain) * MAX_LOCKDEP_CHAINS + sizeof(struct circular_queue) #endif ) / 1024 -- 2.20.0.405.gbc1bbc6f85-goog
| |