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

[PATCH] lockdep: lockdep_depth vs. debug_locks

lockdep found a bug during a run of workqueue function - this could be also
caused by a bug from other code running simultaneously.

lockdep really shouldn't be used when debug_locks == 0!
Reported-by: NFolkert van Heusden <folkert@vanheusden.com>
Inspired-by: NOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NJarek Poplawski <jarkao2@o2.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 058560fb
......@@ -245,7 +245,7 @@ extern void lock_release(struct lockdep_map *lock, int nested,
# define INIT_LOCKDEP .lockdep_recursion = 0,
#define lockdep_depth(tsk) ((tsk)->lockdep_depth)
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
#else /* !LOCKDEP */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册