]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm: memfd_luo: add CONFIG_SHMEM dependency
authorArnd Bergmann <arnd@arndb.de>
Thu, 4 Dec 2025 10:01:58 +0000 (11:01 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 11 Dec 2025 00:07:44 +0000 (16:07 -0800)
The new memfd code fails to link without SHMEM:

aarch64-linux-ld: mm/memfd_luo.o: in function `memfd_luo_retrieve_folios':
memfd_luo.c:(.text.memfd_luo_retrieve_folios+0xdc): undefined reference to `shmem_add_to_page_cache'
memfd_luo.c:(.text.memfd_luo_retrieve_folios+0x11c): undefined reference to `shmem_inode_acct_blocks'
memfd_luo.c:(.text.memfd_luo_retrieve_folios+0x134): undefined reference to `shmem_recalc_inode'

Add a Kconfig dependency to disallow that configuration.

Link: https://lkml.kernel.org/r/20251204100203.1034394-1-arnd@kernel.org
Fixes: b3749f174d68 ("mm: memfd_luo: allow preserving memfd")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/liveupdate/Kconfig

index 9b2515f31afb4b3603c1eadd2cc25ccb07345344..d2aeaf13c3acb8d68be824f34d5d9b5f98f9cb5e 100644 (file)
@@ -54,6 +54,7 @@ config KEXEC_HANDOVER_ENABLE_DEFAULT
 config LIVEUPDATE
        bool "Live Update Orchestrator"
        depends on KEXEC_HANDOVER
+       depends on SHMEM
        help
          Enable the Live Update Orchestrator. Live Update is a mechanism,
          typically based on kexec, that allows the kernel to be updated