MIPS: Sanitize restart logics
authorAl Viro <viro@ftp.linux.org.uk>
Tue, 28 Sep 2010 17:50:37 +0000 (18:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 18 Oct 2010 15:59:02 +0000 (16:59 +0100)
commit8f5a00eb422ed86e77bb8f67e08b9fe6d30f679a
tree6b625361c9581fb71fd2d005b5de54804d4f9798
parente5b377a8fb7b05f27647698ac739a0504cb2bf80
MIPS: Sanitize restart logics

Put the original syscall number into ->regs[0] when we leave syscall
with error.  Use it in restart logics.  Everything else will have
it 0 since we pass through SAVE_SOME on all the ways in.  Note that
in places like bad_stack and inllegal_syscall we leave it 0 - it's not
restartable.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1698/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/branch.c
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/signal.c
arch/mips/kernel/unaligned.c