The patch titled lockdep: internal locking fixes has been added to the -mm tree. Its filename is lockdep-internal-locking-fixes.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: lockdep: internal locking fixes From: Jarek Poplawski <jarkao2@xxxxx> Here are mainly some lockdep returns with 0 with unlocking fixes. Signed-off-by: Jarek Poplawski <jarkao2@xxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/lockdep.c | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff -puN kernel/lockdep.c~lockdep-internal-locking-fixes kernel/lockdep.c --- a/kernel/lockdep.c~lockdep-internal-locking-fixes +++ a/kernel/lockdep.c @@ -227,9 +227,9 @@ static int save_trace(struct stack_trace trace->skip = 3; trace->all_contexts = 0; - - /* Make sure to not recurse in case the the unwinder needs to tak -e locks. */ + /* + * Make sure to not recurse in case the unwinder needs to take locks. + */ lockdep_off(); save_stack_trace(trace, NULL); lockdep_on(); @@ -237,8 +237,10 @@ e locks. */ trace->max_entries = trace->nr_entries; nr_stack_trace_entries += trace->nr_entries; - if (DEBUG_LOCKS_WARN_ON(nr_stack_trace_entries > MAX_STACK_TRACE_ENTRIES)) + if (DEBUG_LOCKS_WARN_ON(nr_stack_trace_entries > MAX_STACK_TRACE_ENTRIES)) { + __raw_spin_unlock(&hash_lock); return 0; + } if (nr_stack_trace_entries == MAX_STACK_TRACE_ENTRIES) { __raw_spin_unlock(&hash_lock); @@ -474,7 +476,8 @@ static int add_lock_to_list(struct lock_ return 0; entry->class = this; - save_trace(&entry->trace); + if (!save_trace(&entry->trace)) + return 0; /* * Since we never remove from the dependency list, the list can @@ -563,7 +566,10 @@ static noinline int print_circular_bug_t return 0; this.class = check_source->class; - save_trace(&this.trace); + /* hash_lock unlocked by the header */ + __raw_spin_lock(&hash_lock); + if (!save_trace(&this.trace)) + return 0; print_circular_bug_entry(&this, 0); printk("\nother info that might help us debug this:\n\n"); @@ -959,6 +965,9 @@ check_prev_add(struct task_struct *curr, } /* + * Return value of 2 signals 'dependency already added', + * in that case we dont have to add the backlink either. + * * Ok, all validations passed, add the new lock * to the previous lock's dependency list: */ @@ -966,15 +975,10 @@ check_prev_add(struct task_struct *curr, &prev->class->locks_after, next->acquire_ip); if (!ret) return 0; - /* - * Return value of 2 signals 'dependency already added', - * in that case we dont have to add the backlink either. - */ - if (ret == 2) - return 2; ret = add_lock_to_list(next->class, prev->class, &next->class->locks_before, next->acquire_ip); - + if (!ret) + return 0; /* * Debugging printouts: */ _ Patches currently in -mm which might be from jarkao2@xxxxx are origin.patch lockdep-internal-locking-fixes.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html