Explorar o código

[MIPS] Always fixup unaligned accesses in kernel mode.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle %!s(int64=18) %!d(string=hai) anos
pai
achega
b772e6d272
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/mips/kernel/unaligned.c

+ 1 - 1
arch/mips/kernel/unaligned.c

@@ -515,7 +515,7 @@ asmlinkage void do_ade(struct pt_regs *regs)
 		goto sigbus;
 
 	pc = (unsigned int __user *) exception_epc(regs);
-	if ((current->thread.mflags & MF_FIXADE) == 0)
+	if (user_mode(regs) && (current->thread.mflags & MF_FIXADE) == 0)
 		goto sigbus;
 
 	/*