diff options
-rw-r--r-- | arch/x86/kernel/dumpstack_64.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 753b8cfe8b8a..87b97897a881 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -94,6 +94,13 @@ static bool in_exception_stack(unsigned long *stack, struct stack_info *info) | |||
94 | BUILD_BUG_ON(N_EXCEPTION_STACKS != 6); | 94 | BUILD_BUG_ON(N_EXCEPTION_STACKS != 6); |
95 | 95 | ||
96 | begin = (unsigned long)__this_cpu_read(cea_exception_stacks); | 96 | begin = (unsigned long)__this_cpu_read(cea_exception_stacks); |
97 | /* | ||
98 | * Handle the case where stack trace is collected _before_ | ||
99 | * cea_exception_stacks had been initialized. | ||
100 | */ | ||
101 | if (!begin) | ||
102 | return false; | ||
103 | |||
97 | end = begin + sizeof(struct cea_exception_stacks); | 104 | end = begin + sizeof(struct cea_exception_stacks); |
98 | /* Bail if @stack is outside the exception stack area. */ | 105 | /* Bail if @stack is outside the exception stack area. */ |
99 | if (stk < begin || stk >= end) | 106 | if (stk < begin || stk >= end) |