diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/lockdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 8c24294e477f..91d67ce3a8d5 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) | |||
3111 | if (!class) | 3111 | if (!class) |
3112 | class = look_up_lock_class(lock, 0); | 3112 | class = look_up_lock_class(lock, 0); |
3113 | 3113 | ||
3114 | if (DEBUG_LOCKS_WARN_ON(!class)) | 3114 | /* |
3115 | * If look_up_lock_class() failed to find a class, we're trying | ||
3116 | * to test if we hold a lock that has never yet been acquired. | ||
3117 | * Clearly if the lock hasn't been acquired _ever_, we're not | ||
3118 | * holding it either, so report failure. | ||
3119 | */ | ||
3120 | if (!class) | ||
3115 | return 0; | 3121 | return 0; |
3116 | 3122 | ||
3117 | if (DEBUG_LOCKS_WARN_ON(!hlock->nest_lock)) | 3123 | if (DEBUG_LOCKS_WARN_ON(!hlock->nest_lock)) |