diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-26 13:29:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-26 13:29:01 -0400 |
commit | 1e4b978154c8cb6cdadd1988c597ef20f837679e (patch) | |
tree | 67c33602bb3125c3957a441fa912044f55ccfc57 /kernel | |
parent | ce8a7424d23a36f043d0de8484f888971c831119 (diff) | |
parent | b48ccb095a0c9257241261ec2bd1cbb1bdabc48b (diff) |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
locking: clarify kernel-taint warning message
lockdep, x86: account for irqs enabled in paranoid_exit
lockdep: more robust lockdep_map init sequence
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/lockdep.c | 22 | ||||
-rw-r--r-- | kernel/panic.c | 2 |
2 files changed, 15 insertions, 9 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index b0f011866969..accb40cdb12a 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -2490,13 +2490,20 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, | |||
2490 | void lockdep_init_map(struct lockdep_map *lock, const char *name, | 2490 | void lockdep_init_map(struct lockdep_map *lock, const char *name, |
2491 | struct lock_class_key *key, int subclass) | 2491 | struct lock_class_key *key, int subclass) |
2492 | { | 2492 | { |
2493 | if (unlikely(!debug_locks)) | 2493 | lock->class_cache = NULL; |
2494 | #ifdef CONFIG_LOCK_STAT | ||
2495 | lock->cpu = raw_smp_processor_id(); | ||
2496 | #endif | ||
2497 | |||
2498 | if (DEBUG_LOCKS_WARN_ON(!name)) { | ||
2499 | lock->name = "NULL"; | ||
2494 | return; | 2500 | return; |
2501 | } | ||
2502 | |||
2503 | lock->name = name; | ||
2495 | 2504 | ||
2496 | if (DEBUG_LOCKS_WARN_ON(!key)) | 2505 | if (DEBUG_LOCKS_WARN_ON(!key)) |
2497 | return; | 2506 | return; |
2498 | if (DEBUG_LOCKS_WARN_ON(!name)) | ||
2499 | return; | ||
2500 | /* | 2507 | /* |
2501 | * Sanity check, the lock-class key must be persistent: | 2508 | * Sanity check, the lock-class key must be persistent: |
2502 | */ | 2509 | */ |
@@ -2505,12 +2512,11 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
2505 | DEBUG_LOCKS_WARN_ON(1); | 2512 | DEBUG_LOCKS_WARN_ON(1); |
2506 | return; | 2513 | return; |
2507 | } | 2514 | } |
2508 | lock->name = name; | ||
2509 | lock->key = key; | 2515 | lock->key = key; |
2510 | lock->class_cache = NULL; | 2516 | |
2511 | #ifdef CONFIG_LOCK_STAT | 2517 | if (unlikely(!debug_locks)) |
2512 | lock->cpu = raw_smp_processor_id(); | 2518 | return; |
2513 | #endif | 2519 | |
2514 | if (subclass) | 2520 | if (subclass) |
2515 | register_lock_class(lock, subclass, 1); | 2521 | register_lock_class(lock, subclass, 1); |
2516 | } | 2522 | } |
diff --git a/kernel/panic.c b/kernel/panic.c index 934fb377f4b3..3dcaa1661357 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -221,7 +221,7 @@ void add_taint(unsigned flag) | |||
221 | * post-warning case. | 221 | * post-warning case. |
222 | */ | 222 | */ |
223 | if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off()) | 223 | if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off()) |
224 | printk(KERN_WARNING "Disabling lockdep due to kernel taint\n"); | 224 | printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n"); |
225 | 225 | ||
226 | set_bit(flag, &tainted_mask); | 226 | set_bit(flag, &tainted_mask); |
227 | } | 227 | } |