diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 636b0745d7c7e..7d09efd25b560 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -437,7 +437,7 @@ unsigned long notrace unwind_stack_by_address(unsigned long stack_page, *sp + sizeof(*regs) <= stack_page + THREAD_SIZE - 32) { regs = (struct pt_regs *)*sp; pc = regs->cp0_epc; - if (__kernel_text_address(pc)) { + if (!user_mode(regs) && __kernel_text_address(pc)) { *sp = regs->regs[29]; *ra = regs->regs[31]; return pc;