summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-17 10:25:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-17 10:25:08 -0700
commit2da9f365fc401b79627bc7be56d8a2b4ee9b390b (patch)
treeb5b2d0f6893b353a60c215bb979eee80a9f3fdf5 /kernel
parent950d0a10d12578a270f3dfa9fd76fe5c2deb343f (diff)
parent80e0401e35410a69bfae05b454db8a7187edd6b8 (diff)
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: lockdep: Fix wrong assumption in match_held_lock
Diffstat (limited to 'kernel')
-rw-r--r--kernel/lockdep.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 8c24294e477..91d67ce3a8d 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -3111,7 +3111,13 @@ static int match_held_lock(struct held_lock *hlock, struct lockdep_map *lock)
if (!class)
class = look_up_lock_class(lock, 0);
- if (DEBUG_LOCKS_WARN_ON(!class))
+ /*
+ * If look_up_lock_class() failed to find a class, we're trying
+ * to test if we hold a lock that has never yet been acquired.
+ * Clearly if the lock hasn't been acquired _ever_, we're not
+ * holding it either, so report failure.
+ */
+ if (!class)
return 0;
if (DEBUG_LOCKS_WARN_ON(!hlock->nest_lock))