mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
lockdep: Add novalidate class for dev->mutex conversion
The conversion of device->sem to device->mutex resulted in lockdep warnings. Create a novalidate class for now until the driver folks come up with separate classes. That way we have at least the basic mutex debugging coverage. Add a checkpatch error so the usage is reserved for device->mutex. [ tglx: checkpatch and compile fix for LOCKDEP=n ] Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
3142788b79
commit
1704f47b50
4 changed files with 25 additions and 0 deletions
|
|
@ -2711,6 +2711,8 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(lockdep_init_map);
|
||||
|
||||
struct lock_class_key __lockdep_no_validate__;
|
||||
|
||||
/*
|
||||
* This gets called for every mutex_lock*()/spin_lock*() operation.
|
||||
* We maintain the dependency maps and validate the locking attempt:
|
||||
|
|
@ -2745,6 +2747,9 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (lock->key == &__lockdep_no_validate__)
|
||||
check = 1;
|
||||
|
||||
if (!subclass)
|
||||
class = lock->class_cache;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue