riscv: return -ENOSYS for syscall -1
authorAndreas Schwab <schwab@suse.de>
Mon, 21 Dec 2020 22:52:00 +0000 (23:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:20 +0000 (18:27 +0100)
commit7c4ced368204f0cd5e1737be858d0c7ded956b14
tree5b5383132ff2c29547391a07650ca187cc121c08
parenteae7b19b32aa5889f19d14ae3887ef4f8cff48f4
riscv: return -ENOSYS for syscall -1

commit cf7b2ae4d70432fa94ebba3fbaab825481ae7189 upstream.

Properly return -ENOSYS for syscall -1 instead of leaving the return value
uninitialized.  This fixes the strace teststuite.

Fixes: 5340627e3fe0 ("riscv: add support for SECCOMP and SECCOMP_FILTER")
Cc: stable@vger.kernel.org
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Tycho Andersen <tycho@tycho.pizza>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/kernel/entry.S