aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/stacktrace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index b71816e47a3..0914d0cbc83 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];