Skip to content

Commit

Permalink
nvme-tcp: fix link failure for TCP auth
Browse files Browse the repository at this point in the history
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: 5bc46b4 ("nvme-tcp: check for invalidated or revoked key")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
  • Loading branch information
arndb authored and keithbusch committed Sep 10, 2024
1 parent 389e72c commit 2d5a333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config NVME_HWMON

config NVME_FABRICS
select NVME_CORE
select NVME_KEYRING if NVME_TCP_TLS
tristate

config NVME_RDMA
Expand Down Expand Up @@ -94,7 +95,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
Expand Down

0 comments on commit 2d5a333

Please sign in to comment.