aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-20 09:27:04 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-02 09:41:31 -0400
commit4f84f4330a11b9eb828bf5af557f4c79c64614a3 (patch)
tree2ff001464083190f67f61fe3766ee2a6eeb8c349 /kernel/lockdep.c
parentbbfa26229a8143889e95e0df4a9d69067ee836cd (diff)
lockdep: Fix backtraces
Truncate stupid -1 entries in backtraces. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1248096665.15751.8816.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 1cedb00e3e7a..2f0970297e30 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -367,11 +367,21 @@ static int save_trace(struct stack_trace *trace)
367 367
368 save_stack_trace(trace); 368 save_stack_trace(trace);
369 369
370 /*
371 * Some daft arches put -1 at the end to indicate its a full trace.
372 *
373 * <rant> this is buggy anyway, since it takes a whole extra entry so a
374 * complete trace that maxes out the entries provided will be reported
375 * as incomplete, friggin useless </rant>
376 */
377 if (trace->entries[trace->nr_entries-1] == ULONG_MAX)
378 trace->nr_entries--;
379
370 trace->max_entries = trace->nr_entries; 380 trace->max_entries = trace->nr_entries;
371 381
372 nr_stack_trace_entries += trace->nr_entries; 382 nr_stack_trace_entries += trace->nr_entries;
373 383
374 if (nr_stack_trace_entries == MAX_STACK_TRACE_ENTRIES) { 384 if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
375 if (!debug_locks_off_graph_unlock()) 385 if (!debug_locks_off_graph_unlock())
376 return 0; 386 return 0;
377 387