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)
committerDinh Nguyen <dinguyen@kernel.org>
Mon, 15 Aug 2022 16:25:32 +0000 (11:25 -0500)
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>
arch/nios2/kernel/entry.S
arch/nios2/kernel/syscall_table.c

index fbd348b..8f41ef5 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 6176d63..c2875a6 100644 (file)
@@ -13,5 +13,6 @@
 #define __SYSCALL(nr, call) [nr] = (call),
 
 void *sys_call_table[__NR_syscalls] = {
+       [0 ... __NR_syscalls-1] = sys_ni_syscall,
 #include <asm/unistd.h>
 };