Commit 1e4b9781 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'core-fixes-for-linus' of...

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
parents ce8a7424 b48ccb09
...@@ -1410,7 +1410,10 @@ ENTRY(paranoid_exit) ...@@ -1410,7 +1410,10 @@ ENTRY(paranoid_exit)
paranoid_swapgs: paranoid_swapgs:
TRACE_IRQS_IRETQ 0 TRACE_IRQS_IRETQ 0
SWAPGS_UNSAFE_STACK SWAPGS_UNSAFE_STACK
RESTORE_ALL 8
jmp irq_return
paranoid_restore: paranoid_restore:
TRACE_IRQS_IRETQ 0
RESTORE_ALL 8 RESTORE_ALL 8
jmp irq_return jmp irq_return
paranoid_userspace: paranoid_userspace:
......
...@@ -2490,13 +2490,20 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, ...@@ -2490,13 +2490,20 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
void lockdep_init_map(struct lockdep_map *lock, const char *name, void lockdep_init_map(struct lockdep_map *lock, const char *name,
struct lock_class_key *key, int subclass) struct lock_class_key *key, int subclass)
{ {
if (unlikely(!debug_locks)) lock->class_cache = NULL;
#ifdef CONFIG_LOCK_STAT
lock->cpu = raw_smp_processor_id();
#endif
if (DEBUG_LOCKS_WARN_ON(!name)) {
lock->name = "NULL";
return; return;
}
lock->name = name;
if (DEBUG_LOCKS_WARN_ON(!key)) if (DEBUG_LOCKS_WARN_ON(!key))
return; return;
if (DEBUG_LOCKS_WARN_ON(!name))
return;
/* /*
* Sanity check, the lock-class key must be persistent: * Sanity check, the lock-class key must be persistent:
*/ */
...@@ -2505,12 +2512,11 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name, ...@@ -2505,12 +2512,11 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
DEBUG_LOCKS_WARN_ON(1); DEBUG_LOCKS_WARN_ON(1);
return; return;
} }
lock->name = name;
lock->key = key; lock->key = key;
lock->class_cache = NULL;
#ifdef CONFIG_LOCK_STAT if (unlikely(!debug_locks))
lock->cpu = raw_smp_processor_id(); return;
#endif
if (subclass) if (subclass)
register_lock_class(lock, subclass, 1); register_lock_class(lock, subclass, 1);
} }
......
...@@ -221,7 +221,7 @@ void add_taint(unsigned flag) ...@@ -221,7 +221,7 @@ void add_taint(unsigned flag)
* post-warning case. * post-warning case.
*/ */
if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off()) if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off())
printk(KERN_WARNING "Disabling lockdep due to kernel taint\n"); printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n");
set_bit(flag, &tainted_mask); set_bit(flag, &tainted_mask);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment