Skip to content

Commit

Permalink
lockdep: fix debug_lock_alloc
Browse files Browse the repository at this point in the history
When we enable DEBUG_LOCK_ALLOC but do not enable PROVE_LOCKING and or
LOCK_STAT, lock_alloc() and lock_release() turn into nops, even though
we should be doing hlock checking (check=1).

This causes a false warning and a lockdep self-disable.

Rectify this.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 11, 2008
1 parent e5f363e commit 0f2bc27
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2935,9 +2935,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
{
unsigned long flags;

if (unlikely(!lock_stat && !prove_locking))
return;

if (unlikely(current->lockdep_recursion))
return;

Expand All @@ -2958,9 +2955,6 @@ void lock_release(struct lockdep_map *lock, int nested,
{
unsigned long flags;

if (unlikely(!lock_stat && !prove_locking))
return;

if (unlikely(current->lockdep_recursion))
return;

Expand Down

0 comments on commit 0f2bc27

Please sign in to comment.