aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 7a3ae56b3a7..4f8df01dbe5 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -386,7 +386,8 @@ static int save_trace(struct stack_trace *trace)
386 * complete trace that maxes out the entries provided will be reported 386 * complete trace that maxes out the entries provided will be reported
387 * as incomplete, friggin useless </rant> 387 * as incomplete, friggin useless </rant>
388 */ 388 */
389 if (trace->entries[trace->nr_entries-1] == ULONG_MAX) 389 if (trace->nr_entries != 0 &&
390 trace->entries[trace->nr_entries-1] == ULONG_MAX)
390 trace->nr_entries--; 391 trace->nr_entries--;
391 392
392 trace->max_entries = trace->nr_entries; 393 trace->max_entries = trace->nr_entries;