[PATCH] lockdep: allow read_lock() recursion of same class
From: Ingo Molnar <mingo@elte.hu> lockdep so far only allowed read-recursion for the same lock instance. This is enough in the overwhelming majority of cases, but a hostap case triggered and reported by Miles Lane relies on same-class different-instance recursion. So we relax the restriction on read-lock recursion. (This change does not allow rwsem read-recursion, which is still forbidden.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
fbb9ce9530
commit
6c9076ec9c
@@ -843,10 +843,9 @@ check_deadlock(struct task_struct *curr, struct held_lock *next,
|
||||
continue;
|
||||
/*
|
||||
* Allow read-after-read recursion of the same
|
||||
* lock instance (i.e. read_lock(lock)+read_lock(lock)):
|
||||
* lock class (i.e. read_lock(lock)+read_lock(lock)):
|
||||
*/
|
||||
if ((read == 2) && prev->read &&
|
||||
(prev->instance == next_instance))
|
||||
if ((read == 2) && prev->read)
|
||||
return 2;
|
||||
return print_deadlock_bug(curr, prev, next);
|
||||
}
|
||||
|
Reference in New Issue
Block a user