|
@@ -386,7 +386,8 @@ static int save_trace(struct stack_trace *trace)
|
|
|
* complete trace that maxes out the entries provided will be reported
|
|
|
* as incomplete, friggin useless </rant>
|
|
|
*/
|
|
|
- if (trace->entries[trace->nr_entries-1] == ULONG_MAX)
|
|
|
+ if (trace->nr_entries != 0 &&
|
|
|
+ trace->entries[trace->nr_entries-1] == ULONG_MAX)
|
|
|
trace->nr_entries--;
|
|
|
|
|
|
trace->max_entries = trace->nr_entries;
|