diff options
Diffstat (limited to 'kernel/locking/lockdep.c')
| -rw-r--r-- | kernel/locking/lockdep.c | 16 | 
1 files changed, 14 insertions, 2 deletions
| diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 151bd3de5936..0349f957e672 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -97,7 +97,6 @@ static struct ctl_table kern_lockdep_table[] = {  		.proc_handler   = proc_dointvec,  	},  #endif /* CONFIG_LOCK_STAT */ -	{ }  };  static __init int kernel_lockdep_sysctls_init(void) @@ -4918,6 +4917,9 @@ EXPORT_SYMBOL_GPL(lockdep_init_map_type);  struct lock_class_key __lockdep_no_validate__;  EXPORT_SYMBOL_GPL(__lockdep_no_validate__); +struct lock_class_key __lockdep_no_track__; +EXPORT_SYMBOL_GPL(__lockdep_no_track__); +  #ifdef CONFIG_PROVE_LOCKING  void lockdep_set_lock_cmp_fn(struct lockdep_map *lock, lock_cmp_fn cmp_fn,  			     lock_print_fn print_fn) @@ -5002,6 +5004,9 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,  	if (unlikely(!debug_locks))  		return 0; +	if (unlikely(lock->key == &__lockdep_no_track__)) +		return 0; +  	if (!prove_locking || lock->key == &__lockdep_no_validate__)  		check = 0; @@ -5764,7 +5769,8 @@ void lock_release(struct lockdep_map *lock, unsigned long ip)  	trace_lock_release(lock, ip); -	if (unlikely(!lockdep_enabled())) +	if (unlikely(!lockdep_enabled() || +		     lock->key == &__lockdep_no_track__))  		return;  	raw_local_irq_save(flags); @@ -5930,6 +5936,9 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip)  	if (DEBUG_LOCKS_WARN_ON(!depth))  		return; +	if (unlikely(lock->key == &__lockdep_no_track__)) +		return; +  	hlock = find_held_lock(curr, lock, depth, &i);  	if (!hlock) {  		print_lock_contention_bug(curr, lock, ip); @@ -5972,6 +5981,9 @@ __lock_acquired(struct lockdep_map *lock, unsigned long ip)  	if (DEBUG_LOCKS_WARN_ON(!depth))  		return; +	if (unlikely(lock->key == &__lockdep_no_track__)) +		return; +  	hlock = find_held_lock(curr, lock, depth, &i);  	if (!hlock) {  		print_lock_contention_bug(curr, lock, _RET_IP_); | 
