Skip to content

Commit

Permalink
lockdep: fix spurious 'inconsistent lock state' warning
Browse files Browse the repository at this point in the history
Since f82b217 lockdep can output spurious
warnings related to hwirqs due to hardirq_off shrinkage from int to bit-sized
flag. Guard it with double negation to fix the warning.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Dmitry Baryshkov authored and Ingo Molnar committed Aug 18, 2008
1 parent b09c3e3 commit 6951b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2582,7 +2582,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
hlock->trylock = trylock;
hlock->read = read;
hlock->check = check;
hlock->hardirqs_off = hardirqs_off;
hlock->hardirqs_off = !!hardirqs_off;
#ifdef CONFIG_LOCK_STAT
hlock->waittime_stamp = 0;
hlock->holdtime_stamp = sched_clock();
Expand Down

0 comments on commit 6951b12

Please sign in to comment.