Re: [PATCH v2] kernel/sys_ni: add compat entry for fadvise64_64

From: Arnd Bergmann
Date: Mon Aug 08 2022 - 02:58:39 EST


On Mon, Aug 8, 2022 at 12:09 AM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
> set/enabled, the riscv compat_syscall_table references
> 'compat_sys_fadvise64_64', which is not defined:
>
> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
> undefined reference to `compat_sys_fadvise64_64'
>
> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
> function available.
>
> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>