Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42964
b: refs/heads/master
c: 70e4506
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Dec 7, 2006
1 parent 82dbd04 commit 0483688
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72be2ccfff0e0e332b32f7ef8372890e39b7c4cb
refs/heads/master: 70e4506765602cca047cfa31933836e354c61a63
6 changes: 6 additions & 0 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
struct lockdep_subclass_key *key;
struct list_head *hash_head;
struct lock_class *class;
unsigned long flags;

class = look_up_lock_class(lock, subclass);
if (likely(class))
Expand All @@ -1203,6 +1204,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
key = lock->key->subkeys + subclass;
hash_head = classhashentry(key);

raw_local_irq_save(flags);
__raw_spin_lock(&hash_lock);
/*
* We have to do the hash-walk again, to avoid races
Expand All @@ -1217,6 +1219,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
*/
if (nr_lock_classes >= MAX_LOCKDEP_KEYS) {
__raw_spin_unlock(&hash_lock);
raw_local_irq_restore(flags);
debug_locks_off();
printk("BUG: MAX_LOCKDEP_KEYS too low!\n");
printk("turning off the locking correctness validator.\n");
Expand All @@ -1239,15 +1242,18 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)

if (verbose(class)) {
__raw_spin_unlock(&hash_lock);
raw_local_irq_restore(flags);
printk("\nnew class %p: %s", class->key, class->name);
if (class->name_version > 1)
printk("#%d", class->name_version);
printk("\n");
dump_stack();
raw_local_irq_save(flags);
__raw_spin_lock(&hash_lock);
}
out_unlock_set:
__raw_spin_unlock(&hash_lock);
raw_local_irq_restore(flags);

if (!subclass || force)
lock->class_cache = class;
Expand Down

0 comments on commit 0483688

Please sign in to comment.