aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:34 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:34 -0400
commit3fa7c794fe4dc127f7fac3fad4d13628e68f89ce (patch)
tree855a6737a2275317bcd3f3a9934c33dcadba6e6f /kernel/lockdep.c
parent5a1b3999d6cb7ab87f1f3b1700bc91839fd6fa29 (diff)
[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: Andi Kleen <ak@suse.de>
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 900b4cb1a024..c088e5542e84 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -227,7 +227,11 @@ static int save_trace(struct stack_trace *trace)
227 trace->skip = 3; 227 trace->skip = 3;
228 trace->all_contexts = 0; 228 trace->all_contexts = 0;
229 229
230 /* Make sure to not recurse in case the the unwinder needs to tak
231e locks. */
232 lockdep_off();
230 save_stack_trace(trace, NULL); 233 save_stack_trace(trace, NULL);
234 lockdep_on();
231 235
232 trace->max_entries = trace->nr_entries; 236 trace->max_entries = trace->nr_entries;
233 237