From 6c9076ec9cd448f43bbda871352a7067f456ee26 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 3 Jul 2006 00:24:51 -0700 Subject: [PATCH] lockdep: allow read_lock() recursion of same class From: Ingo Molnar 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/lockdep.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'kernel') diff --git a/kernel/lockdep.c b/kernel/lockdep.c index dd0580910a9..f32ca78c198 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -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); } -- cgit v1.2.3