瀏覽代碼

[MIPS] Always fixup unaligned accesses in kernel mode.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 18 年之前
父節點
當前提交
b772e6d272
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
 
 	/*