/[packages]/backports/8/kernel/current/SOURCES/kernel-sys_ni-add-compat-entry-for-fadvise64_64.patch
ViewVC logotype

Contents of /backports/8/kernel/current/SOURCES/kernel-sys_ni-add-compat-entry-for-fadvise64_64.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1880454 - (show annotations) (download)
Fri Aug 26 04:48:43 2022 UTC (19 months, 4 weeks ago) by tmb
File size: 1676 byte(s)
- update to 5.19.4
  * drop merged patches
- add current -stable queue


1 From a8faed3a02eeb75857a3b5d660fa80fe79db77a3 Mon Sep 17 00:00:00 2001
2 From: Randy Dunlap <rdunlap@infradead.org>
3 Date: Sun, 7 Aug 2022 15:09:34 -0700
4 Subject: kernel/sys_ni: add compat entry for fadvise64_64
5
6 From: Randy Dunlap <rdunlap@infradead.org>
7
8 commit a8faed3a02eeb75857a3b5d660fa80fe79db77a3 upstream.
9
10 When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
11 set/enabled, the riscv compat_syscall_table references
12 'compat_sys_fadvise64_64', which is not defined:
13
14 riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
15 undefined reference to `compat_sys_fadvise64_64'
16
17 Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function so
18 that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback function
19 available.
20
21 Link: https://lkml.kernel.org/r/20220807220934.5689-1-rdunlap@infradead.org
22 Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
23 Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
24 Suggested-by: Arnd Bergmann <arnd@arndb.de>
25 Reviewed-by: Arnd Bergmann <arnd@arndb.de>
26 Cc: Josh Triplett <josh@joshtriplett.org>
27 Cc: Paul Walmsley <paul.walmsley@sifive.com>
28 Cc: Palmer Dabbelt <palmer@dabbelt.com>
29 Cc: Albert Ou <aou@eecs.berkeley.edu>
30 Cc: <stable@vger.kernel.org>
31 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
32 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 ---
34 kernel/sys_ni.c | 1 +
35 1 file changed, 1 insertion(+)
36
37 --- a/kernel/sys_ni.c
38 +++ b/kernel/sys_ni.c
39 @@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
40
41 /* mm/fadvise.c */
42 COND_SYSCALL(fadvise64_64);
43 +COND_SYSCALL_COMPAT(fadvise64_64);
44
45 /* mm/, CONFIG_MMU only */
46 COND_SYSCALL(swapon);

  ViewVC Help
Powered by ViewVC 1.1.30