diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2011-08-29 16:08:51 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2011-08-29 16:08:51 +0900 |
| commit | b9a3acf46afdafc601947136f63e9dd228cd86e8 (patch) | |
| tree | 2b206b6d3c51f673c94fbcdf03df2a699e7110d2 /kernel/lockdep.c | |
| parent | 9f0fa7991af382bfa8c9575d2457a0b6ad03ac4c (diff) | |
| parent | 21d41f2b312231536cf981c960c83cc4493c0293 (diff) | |
Merge branch 'sh/stable-updates' into sh-latest
Diffstat (limited to 'kernel/lockdep.c')
| -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) 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)) |
