mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 23:11:27 +00:00
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>
This commit is contained in:
parent
e5b377a8fb
commit
8f5a00eb42
7 changed files with 34 additions and 35 deletions
|
@ -40,7 +40,6 @@ int __compute_return_epc(struct pt_regs *regs)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
regs->regs[0] = 0;
|
||||
switch (insn.i_format.opcode) {
|
||||
/*
|
||||
* jr and jalr are in r_format format.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue