Commit e3a55fd1 authored by Jarek Poplawski's avatar Jarek Poplawski Committed by 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: default avatarFolkert van Heusden <folkert@vanheusden.com>
Inspired-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarJarek Poplawski <jarkao2@o2.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment