aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2010-03-18 20:37:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:30 -0400
commit1704f47b50b5d9e1b825e43e1baaf2c5897baf03 (patch)
tree60617ff867624f915f75a502f2207de5e586757a /kernel
parent3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2 (diff)
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 <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/lockdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index ec21304856d1..54286798c37b 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2711,6 +2711,8 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
2711} 2711}
2712EXPORT_SYMBOL_GPL(lockdep_init_map); 2712EXPORT_SYMBOL_GPL(lockdep_init_map);
2713 2713
2714struct lock_class_key __lockdep_no_validate__;
2715
2714/* 2716/*
2715 * This gets called for every mutex_lock*()/spin_lock*() operation. 2717 * This gets called for every mutex_lock*()/spin_lock*() operation.
2716 * We maintain the dependency maps and validate the locking attempt: 2718 * 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,
2745 return 0; 2747 return 0;
2746 } 2748 }
2747 2749
2750 if (lock->key == &__lockdep_no_validate__)
2751 check = 1;
2752
2748 if (!subclass) 2753 if (!subclass)
2749 class = lock->class_cache; 2754 class = lock->class_cache;
2750 /* 2755 /*