mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
[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:
parent
fbb9ce9530
commit
6c9076ec9c
2 changed files with 6 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue