core/locking for v2.6.27
Subsystems (4)
Linus,
Please pull the latest core/locking git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core/locking
Thanks,
Ingo
------------------>
Huang, Ying (3):
lockdep: output lock_class key instead of address for forward dependency output
lockdep: add lock_class information to lock_chain and output it
lockdep: add lock_class information to lock_chain and output it
Ingo Molnar (2):
lockdep: fix ftrace irq tracing false positive
lockdep: fix kernel/fork.c warning
Jeremy Kerr (1):
mutex-debug: check mutex magic before owner
Li Zefan (1):
lockdep: remove duplicate definition of STATIC_LOCKDEP_MAP_INIT
Oleg Nesterov (1):
__mutex_lock_common: use signal_pending_state()
include/linux/lockdep.h | 11 +---- kernel/fork.c | 2 +- kernel/lockdep.c | 47 +++++++++++++++++++-- kernel/lockdep_internals.h | 6 +++ kernel/lockdep_proc.c | 97 +++++++++++++++++++++++++++++++++++++++++++- kernel/mutex-debug.c | 2 +- kernel/mutex.c | 5 +-- 7 files changed, 151 insertions(+), 19 deletions(-)
include/linux/lockdep.h +3 -8
@@ -182,6 +182,9 @@ struct lock_list {* We record lock dependency chains, so that we can cache them: */ struct lock_chain { +u8 irq_context; +u8 depth; +u16 base;struct list_head entry;u64 chain_key; };
@@ -276,14 +279,6 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, (lock)->dep_map.key, sub)/* -* To initialize a lockdep_map statically use this macro. -* Note that _name must not be NULL. -*/ -#define STATIC_LOCKDEP_MAP_INIT (_name, _key) \ - { .name = (_name), .key = (void *)(_key), } - - -/* * Acquire a lock. * * Values for "read":
kernel/fork.c +1 -1
@@ -909,7 +909,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,rt_mutex_init_task (p); -#ifdef CONFIG_TRACE_IRQFLAGS +#ifdef CONFIG_PROVE_LOCKING DEBUG_LOCKS_WARN_ON (!p->hardirqs_enabled);DEBUG_LOCKS_WARN_ON (!p->softirqs_enabled);#endif
kernel/lockdep.c +43 -4
80 lines not on this page · raw message
kernel/lockdep_internals.h +6 -0
@@ -23,6 +23,8 @@#define MAX_LOCKDEP_CHAINS_BITS 14#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS) +#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5) +/* * Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock.
@@ -30,15 +32,19 @@#define MAX_STACK_TRACE_ENTRIES 262144ULextern struct list_head all_lock_classes; +extern struct lock_chain lock_chains[];extern void get_usage_chars (struct lock_class *class,char *c1,char *c2,char *c3,char *c4);extern const char *__get_key_name (struct lockdep_subclass_key *key,char *str); +struct lock_class *lock_chain_get_class (struct lock_chain *chain,int i); +extern unsigned long nr_lock_classes;extern unsigned long nr_list_entries;extern unsigned long nr_lock_chains; +extern int nr_chain_hlocks;extern unsigned long nr_stack_trace_entries;extern unsigned int nr_hardirq_chains;
kernel/lockdep_proc.c +96 -1
121 lines not on this page · raw message
kernel/mutex-debug.c +1 -1
@@ -79,8 +79,8 @@ void debug_mutex_unlock(struct mutex *lock)if (unlikely (!debug_locks))return ; -DEBUG_LOCKS_WARN_ON (lock->owner !=current_thread_info ());DEBUG_LOCKS_WARN_ON (lock->magic != lock); +DEBUG_LOCKS_WARN_ON (lock->owner !=current_thread_info ());DEBUG_LOCKS_WARN_ON (!lock->wait_list.prev && !lock->wait_list.next);DEBUG_LOCKS_WARN_ON (lock->owner !=current_thread_info ()); }
kernel/mutex.c +1 -4
@@ -165,10 +165,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,* got a signal? (This code gets eliminated in the * TASK_UNINTERRUPTIBLE case.) */ -if (unlikely ((state ==TASK_INTERRUPTIBLE && -signal_pending (task)) || - (state ==TASK_KILLABLE && -fatal_signal_pending (task)))) { +if (unlikely (signal_pending_state (state, task))) {mutex_remove_waiter (lock, &waiter,task_thread_info (task));mutex_release (&lock->dep_map,1 , ip);