diff options
author | Jarek Poplawski <jarkao2@o2.pl> | 2007-02-20 16:58:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-20 20:10:14 -0500 |
commit | 60e114d1134555d1813e20a8cd86304331da05c7 (patch) | |
tree | 2cd482be7f82b8c2f6bf1fde7bcf288471e4cd6b | |
parent | 34173a4aad7a641e72b70f9927ca797746fbce69 (diff) |
[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 <jarkao2@o2.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/lockdep.c | 4 |
1 files changed, 4 insertions, 0 deletions
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: | |||
2228 | 2228 | ||
2229 | curr->lockdep_depth++; | 2229 | curr->lockdep_depth++; |
2230 | check_chain_key(curr); | 2230 | check_chain_key(curr); |
2231 | #ifdef CONFIG_DEBUG_LOCKDEP | ||
2232 | if (unlikely(!debug_locks)) | ||
2233 | return 0; | ||
2234 | #endif | ||
2231 | if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { | 2235 | if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { |
2232 | debug_locks_off(); | 2236 | debug_locks_off(); |
2233 | printk("BUG: MAX_LOCK_DEPTH too low!\n"); | 2237 | printk("BUG: MAX_LOCK_DEPTH too low!\n"); |