summaryrefslogtreecommitdiffstats
path: root/kernel/stacktrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/stacktrace.c')
-rw-r--r--kernel/stacktrace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index b71816e47a30..0914d0cbc83c 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];