• James Hogan's avatar
    MIPS: Save static registers before sysmips · 49955d84
    James Hogan authored
    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: f1e39a4a ("MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler")
    Signed-off-by: default avatarJames 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: default avatarRalf Baechle <ralf@linux-mips.org>
    49955d84
scall64-64.S 9.76 KB