From: Jarek Poplawski Date: Tue, 20 Feb 2007 21:58:00 +0000 (-0800) Subject: [PATCH] lockdep: debug_locks check after check_chain_key X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60e114d1134555d1813e20a8cd86304331da05c7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [PATCH] lockdep: debug_locks check after check_chain_key In __lock_acquire check_chain_key can turn off debug_locks, so check is needed to assure proper return code. Signed-off-by: Jarek Poplawski Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 592c576d77a7..a08a17218dfa 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2228,6 +2228,10 @@ out_calc_hash: curr->lockdep_depth++; check_chain_key(curr); +#ifdef CONFIG_DEBUG_LOCKDEP + if (unlikely(!debug_locks)) + return 0; +#endif if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { debug_locks_off(); printk("BUG: MAX_LOCK_DEPTH too low!\n");