linux-next: build failure after merge of the mm tree
Subsystems (2)
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 <[email protected]>
Date: Mon, 9 Dec 2024 15:23:48 +1100
Subject: [PATCH] fix up for "mm: perform all memfd seal checks in a single place"
--- include/linux/memfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/memfd.h +1 -1
@@ -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 ; }
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 50 lines · Stephen Rothwell
Hi all,
After merging the mm tree, today's linux-next build (
x86_64allnoconfig) 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 | intmemfd_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 hereCaused 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 <[email protected]>
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 <[email protected]>--- include/linux/memfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/memfd.h +0
-0
include/linux/memfd.h static inline struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
Quoted 9 lines
include/linux/memfd.h +1
-2@@ -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 ; } --
Thanks, apologies for this, a rather silly typo. I have now sent a fix-patch to Andrew so hopefully this should come out in the wash also from mm side.
Quoted 5 lines
2.45.2
--
Cheers,
Stephen Rothwell