summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/entry.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-02 21:45:12 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-09-22 15:47:11 +0200
commitf76f330809e0c9e7235584273b5a5d6adccded52 (patch)
tree7130f75428064a7df4c6d8da1b6ce66ebb3d5419 /arch/mips/kernel/entry.S
parente376fdf42062e7373b82093b278f99aa2b547db7 (diff)
MIPS: Prevent hitting do_notify_resume() with !user_mode(regs).
Too late to do anything there... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/entry.S')
-rw-r--r--arch/mips/kernel/entry.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 37acfa036d4..4b0937f1986 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -167,6 +167,9 @@ work_notifysig: # deal with pending signals and
FEXPORT(syscall_exit_work_partial)
SAVE_STATIC
syscall_exit_work:
+ LONG_L t0, PT_STATUS(sp) # returning to kernel mode?
+ andi t0, t0, KU_USER
+ beqz t0, resume_kernel
li t0, _TIF_WORK_SYSCALL_EXIT
and t0, a2 # a2 is preloaded with TI_FLAGS
beqz t0, work_pending # trace bit set?