Skip to content

Commit 79ce0b1

Browse files
rddunlapgregkh
authored andcommitted
kernel/sys_ni: add compat entry for fadvise64_64
commit a8faed3 upstream. 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. Link: https://lkml.kernel.org/r/[email protected] Fixes: d3ac21c ("mm: Support compiling out madvise and fadvise") Signed-off-by: Randy Dunlap <[email protected]> Suggested-by: Arnd Bergmann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Albert Ou <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 760dc9f commit 79ce0b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/sys_ni.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
277277

278278
/* mm/fadvise.c */
279279
COND_SYSCALL(fadvise64_64);
280+
COND_SYSCALL_COMPAT(fadvise64_64);
280281

281282
/* mm/, CONFIG_MMU only */
282283
COND_SYSCALL(swapon);

0 commit comments

Comments
 (0)