]> git.hungrycats.org Git - linux/commitdiff
nvme-tcp: fix link failure for TCP auth
authorArnd Bergmann <arnd@arndb.de>
Mon, 9 Sep 2024 20:21:09 +0000 (20:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:43 +0000 (12:00 +0200)
[ Upstream commit 2d5a333e09c388189238291577e443221baacba0 ]

The nvme fabric driver calls the nvme_tls_key_lookup() function from
nvmf_parse_key() when the keyring is enabled, but this is broken in a
configuration with CONFIG_NVME_FABRICS=y and CONFIG_NVME_TCP=m because
this leads to the function definition being in a loadable module:

x86_64-linux-ld: vmlinux.o: in function `nvmf_parse_key':
fabrics.c:(.text+0xb1bdec): undefined reference to `nvme_tls_key_lookup'

Move the 'select' up to CONFIG_NVME_FABRICS itself to force this
part to be built-in as well if needed.

Fixes: 5bc46b49c828 ("nvme-tcp: check for invalidated or revoked key")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/Kconfig

index 854eb26ac3db95ad6c6f9767626cfdf3847f2c0b..e6bb73c168872aad032ab61e03a5a5f6d91b0736 100644 (file)
@@ -42,6 +42,7 @@ config NVME_HWMON
 
 config NVME_FABRICS
        select NVME_CORE
+       select NVME_KEYRING if NVME_TCP_TLS
        tristate
 
 config NVME_RDMA
@@ -95,7 +96,6 @@ config NVME_TCP
 config NVME_TCP_TLS
        bool "NVMe over Fabrics TCP TLS encryption support"
        depends on NVME_TCP
-       select NVME_KEYRING
        select NET_HANDSHAKE
        select KEYS
        help