提交 3fa7c794 编写于 作者: A Andi Kleen 提交者: Andi Kleen

[PATCH] Avoid recursion in lockdep when stack tracer takes locks

The new dwarf2 unwinder needs to take locks to do backtraces
inside modules. This patch makes sure lockdep which calls
stacktrace is not reentered.

Thanks to Ingo for suggesting this simpler approach.

Cc: mingo@elte.hu
Signed-off-by: NAndi Kleen <ak@suse.de>
上级 5a1b3999
......@@ -227,7 +227,11 @@ static int save_trace(struct stack_trace *trace)
trace->skip = 3;
trace->all_contexts = 0;
/* Make sure to not recurse in case the the unwinder needs to tak
e locks. */
lockdep_off();
save_stack_trace(trace, NULL);
lockdep_on();
trace->max_entries = trace->nr_entries;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册