summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/unaligned.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-02-24 22:04:04 +0100
committerRalf Baechle <ralf@linux-mips.org>2007-02-27 00:06:06 +0100
commitb772e6d272152808cede1c8f5387626b6329538c (patch)
tree844d4d9953b28c4e2b0f8efb6b60d217ea918753 /arch/mips/kernel/unaligned.c
parent[MIPS] Fix dma_sync_*_for_device() functions (diff)
downloadlinux-b772e6d272152808cede1c8f5387626b6329538c.tar.xz
linux-b772e6d272152808cede1c8f5387626b6329538c.zip
[MIPS] Always fixup unaligned accesses in kernel mode.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
-rw-r--r--arch/mips/kernel/unaligned.c2
1 files changed, 1 insertions, 1 deletions
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;
/*