Hi all, After merging the mm tree, today's linux-next build (x86_64 allnoconfig) failed like this: In file included from mm/mmap.c:50: include/linux/memfd.h:27:5: warning: no previous prototype for 'memfd_check_seals_mmap' [-Wmissing-prototypes] 27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) | ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/fcntl.c:26: include/linux/memfd.h:27:5: warning: no previous prototype for 'memfd_check_seals_mmap' [-Wmissing-prototypes] 27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) | ^~~~~~~~~~~~~~~~~~~~~~ In file included from mm/gup.c:8: include/linux/memfd.h:27:5: warning: no previous prototype for 'memfd_check_seals_mmap' [-Wmissing-prototypes] 27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) | ^~~~~~~~~~~~~~~~~~~~~~ In file included from mm/secretmem.c:12: include/linux/memfd.h:27:5: warning: no previous prototype for 'memfd_check_seals_mmap' [-Wmissing-prototypes] 27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) | ^~~~~~~~~~~~~~~~~~~~~~ x86_64-linux-gnu-ld: mm/mmap.o: in function `memfd_check_seals_mmap': mmap.c:(.text+0x200): multiple definition of `memfd_check_seals_mmap'; mm/gup.o:gup.c:(.text+0xf60): first defined here x86_64-linux-gnu-ld: mm/secretmem.o: in function `memfd_check_seals_mmap': secretmem.c:(.text+0x3c0): multiple definition of `memfd_check_seals_mmap'; mm/gup.o:gup.c:(.text+0xf60): first defined here x86_64-linux-gnu-ld: fs/fcntl.o: in function `memfd_check_seals_mmap': fcntl.c:(.text+0x270): multiple definition of `memfd_check_seals_mmap'; mm/gup.o:gup.c:(.text+0xf60): first defined here Caused by commit 6b72648c4e2b ("mm: perform all memfd seal checks in a single place") from the mm-unstable branch of the mm tree. I have applied the following patch for today: From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Mon, 9 Dec 2024 15:23:48 +1100 Subject: [PATCH] fix up for "mm: perform all memfd seal checks in a single place" Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> --- include/linux/memfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/memfd.h b/include/linux/memfd.h index d53408b0bd31..4397e3b4f0f9 100644 --- a/include/linux/memfd.h +++ b/include/linux/memfd.h @@ -24,7 +24,7 @@ static inline struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx) { return ERR_PTR(-EINVAL); } -int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) +static inline int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) { return 0; } -- 2.45.2 -- Cheers, Stephen Rothwell
Attachment:
pgpIZDzY9zCr5.pgp
Description: OpenPGP digital signature