diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c index b71816e47a3019ed3d55f0a7ceb5cc179fa32370..0914d0cbc83c9f48496b927602d87e6293d4530a 100644 --- a/kernel/stacktrace.c +++ b/kernel/stacktrace.c @@ -13,6 +13,9 @@ void print_stack_trace(struct stack_trace *trace, int spaces) { int i, j; + if (WARN_ON(!trace->entries)) + return; + for (i = 0; i < trace->nr_entries; i++) { unsigned long ip = trace->entries[i];