]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
nios2: fix syscall restart checks
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 8 Aug 2022 15:08:48 +0000 (16:08 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:57:23 +0000 (11:57 +0200)
commit7dc1168a963d46b2b7ce6f1a4ab95b49350299ec
tree4d6b076b487aa4867b48689b5fbbc0409aeac5c2
parentfe8bc7096bc108c412eadc17811f136ce0279e14
nios2: fix syscall restart checks

BugLink: https://bugs.launchpad.net/bugs/1990564
commit 2d631bd58fe0ea3e3350212e23c9aba1fb606514 upstream.

sys_foo() returns -512 (aka -ERESTARTSYS) => do_signal() sees
512 in r2 and 1 in r1.

sys_foo() returns 512 => do_signal() sees 512 in r2 and 0 in r1.

The former is restart-worthy; the latter obviously isn't.

Fixes: b53e906d255d ("nios2: Signal handling support")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/nios2/kernel/signal.c