提交 60e114d1 编写于 作者: J Jarek Poplawski 提交者: Linus Torvalds

[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: NJarek Poplawski <jarkao2@o2.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 34173a4a
......@@ -2228,6 +2228,10 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册