mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
lockdep: fix overflow in the hlock shrinkage code
There is a overflow by 1 case in the new shrunken hlock code. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
3295f0ef9f
commit
b42e737e57
1 changed files with 6 additions and 1 deletions
|
@ -191,7 +191,12 @@ struct lock_chain {
|
|||
};
|
||||
|
||||
#define MAX_LOCKDEP_KEYS_BITS 11
|
||||
#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS)
|
||||
/*
|
||||
* Subtract one because we offset hlock->class_idx by 1 in order
|
||||
* to make 0 mean no class. This avoids overflowing the class_idx
|
||||
* bitfield and hitting the BUG in hlock_class().
|
||||
*/
|
||||
#define MAX_LOCKDEP_KEYS ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1)
|
||||
|
||||
struct held_lock {
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue