]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
MIPS: Save static registers before sysmips
authorJames Hogan <james.hogan@imgtec.com>
Wed, 31 May 2017 15:19:48 +0000 (16:19 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 28 Jun 2017 10:22:40 +0000 (12:22 +0200)
commit49955d84cd9ccdca5a16a495e448e1a06fad9e49
tree6079d40979a3343c3d93e69e665e7f06176f8676
parent2ec420b26f7b6ff332393f0bb5a7d245f7ad87f0
MIPS: Save static registers before sysmips

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
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16149/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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/syscall.c