Browse Source

[MIPS] Always fixup unaligned accesses in kernel mode.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 18 years ago
parent
commit
b772e6d272
1 changed files with 1 additions and 1 deletions
  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;
 
 	/*