diff options
author | James Hogan <james.hogan@imgtec.com> | 2017-06-29 12:12:35 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-07-11 15:13:06 +0300 |
commit | becddba9f80f26a2b9ebe9bad2806304ed5e00e1 (patch) | |
tree | 93e393bee3f3bf46d62e208da2ced0b7022c8605 /arch/mips/generic | |
parent | 4f32a39d49b25eaa66d2420f1f03d371ea4cd906 (diff) | |
download | linux-becddba9f80f26a2b9ebe9bad2806304ed5e00e1.tar.xz |
MIPS: Correct forced syscall errors
When the system call return value is forced to be an error (for example
due to SECCOMP_RET_ERRNO), syscall_set_return_value() puts the error
code in the return register $v0 and -1 in the error register $a3.
However normally executed system calls put 1 in the error register
rather than -1, so fix syscall_set_return_value() to be consistent with
that.
I don't anticipate that anything would have been broken by this, since
the most natural way to check the error register on MIPS would be a
conditional branch if error register is [not] equal to zero (bnez or
beqz).
Fixes: 1d7bf993e073 ("MIPS: ftrace: Add support for syscall tracepoints.")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16652/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/generic')
0 files changed, 0 insertions, 0 deletions