From b772e6d272152808cede1c8f5387626b6329538c Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 24 Feb 2007 21:04:04 +0000 Subject: [PATCH] [MIPS] Always fixup unaligned accesses in kernel mode. Signed-off-by: Ralf Baechle --- arch/mips/kernel/unaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 7e7d54823486..24b7b053cfe9 100644 --- a/arch/mips/kernel/unaligned.c +++ b/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; /* -- 2.30.2