]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/mips/kernel/process.c
MIPS: Don't unwind to user mode with EVA
[karo-tx-linux.git] / arch / mips / kernel / process.c
index 92880cee449e147043f4007204f286b6cd869f88..3f5aa3bc191e71eb8f9b72860b3ff6e7680b64c1 100644 (file)
@@ -455,7 +455,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;