diff options
author | James Hogan <james.hogan@imgtec.com> | 2017-05-31 15:19:48 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-27 22:08:04 (GMT) |
commit | f8c331cbc937d849d93dc9f3f7cdc31d5fbac58e (patch) | |
tree | 15df4d78d429eae9036a0601feea6b6d00ccba9a /arch/mips/kernel/scall64-64.S | |
parent | a9db2f4f887c2cc9557fc2ae553ea24ecc65c6e0 (diff) | |
download | linux-f8c331cbc937d849d93dc9f3f7cdc31d5fbac58e.tar.xz |
MIPS: Save static registers before sysmips
commit 49955d84cd9ccdca5a16a495e448e1a06fad9e49 upstream.
The MIPS sysmips system call handler may return directly from the
MIPS_ATOMIC_SET case (mips_atomic_set()) to syscall_exit. This path
restores the static (callee saved) registers, however they won't have
been saved on entry to the system call.
Use the save_static_function() macro to create a __sys_sysmips wrapper
function which saves the static registers before calling sys_sysmips, so
that the correct static register state is restored by syscall_exit.
Fixes: f1e39a4a616c ("MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16149/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/kernel/scall64-64.S')
-rw-r--r-- | arch/mips/kernel/scall64-64.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 0687f96..aa27daf 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S @@ -311,7 +311,7 @@ EXPORT(sys_call_table) PTR sys_sched_getaffinity PTR sys_cacheflush PTR sys_cachectl - PTR sys_sysmips + PTR __sys_sysmips PTR sys_io_setup /* 5200 */ PTR sys_io_destroy PTR sys_io_getevents |