diff options
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 7a3ae56b3a7f..4f8df01dbe51 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; |