提交 58f50c5d 编写于 作者: A Al Viro 提交者: Zheng Zengkai

nios2: don't leave NULLs in sys_call_table[]

stable inclusion
from stable-v5.10.138
commit 1d2c89dc4837cdd9d0e672ec6d3357cd1362b1b7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1d2c89dc4837cdd9d0e672ec6d3357cd1362b1b7

--------------------------------

commit 45ec746c upstream.

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

Fixes: 82ed08dd ("nios2: Exception handling")
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDinh Nguyen <dinguyen@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 ffe05898
...@@ -193,7 +193,6 @@ local_restart: ...@@ -193,7 +193,6 @@ local_restart:
movhi r11, %hiadj(sys_call_table) movhi r11, %hiadj(sys_call_table)
add r1, r1, r11 add r1, r1, r11
ldw r1, %lo(sys_call_table)(r1) ldw r1, %lo(sys_call_table)(r1)
beq r1, r0, ret_invsyscall
/* Check if we are being traced */ /* Check if we are being traced */
GET_THREAD_INFO r11 GET_THREAD_INFO r11
......
...@@ -13,5 +13,6 @@ ...@@ -13,5 +13,6 @@
#define __SYSCALL(nr, call) [nr] = (call), #define __SYSCALL(nr, call) [nr] = (call),
void *sys_call_table[__NR_syscalls] = { void *sys_call_table[__NR_syscalls] = {
[0 ... __NR_syscalls-1] = sys_ni_syscall,
#include <asm/unistd.h> #include <asm/unistd.h>
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册