Skip to content

Commit

Permalink
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  • Loading branch information
Linus Torvalds committed Aug 17, 2011
2 parents 950d0a1 + 80e0401 commit 2da9f36
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2da9f36

Please sign in to comment.