nios2: don't leave NULLs in sys_call_table[]
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 8 Aug 2022 15:06:46 +0000 (16:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:11:33 +0000 (11:11 +0200)
commit 45ec746c65097c25e77d24eae8fee0def5b6cc5d upstream.

fill the gaps in there with sys_ni_syscall, as everyone does...

Fixes: 82ed08dd1b0e ("nios2: Exception handling")
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>
arch/nios2/kernel/entry.S
arch/nios2/kernel/syscall_table.c

index 668f928db7873b1c433fdb0d264136de1dc2422b..4e0bf52e68ea2d4bd56abc193c11cbad222dc2e0 100644 (file)
@@ -193,7 +193,6 @@ local_restart:
        movhi   r11, %hiadj(sys_call_table)
        add     r1, r1, r11
        ldw     r1, %lo(sys_call_table)(r1)
-       beq     r1, r0, ret_invsyscall
 
        /* Check if we are being traced */
        GET_THREAD_INFO r11
index 06e6ac1835b2ed93f420a4ab0d1e06911144486b..cd10b6eed12836dbd7e81f4a19b90a6cc434b555 100644 (file)
@@ -25,5 +25,6 @@
 #define __SYSCALL(nr, call) [nr] = (call),
 
 void *sys_call_table[__NR_syscalls] = {
+       [0 ... __NR_syscalls-1] = sys_ni_syscall,
 #include <asm/unistd.h>
 };