Skip to content

Commit 65e2a74

Browse files
arndbaxboe
authored andcommitted
nvme: target: fix Kconfig select statements
When the NVME target code is built-in but its TCP frontend is a loadable module, enabling keyring support causes a link failure: x86_64-linux-ld: vmlinux.o: in function `nvmet_ports_make': configfs.c:(.text+0x100a211): undefined reference to `nvme_keyring_id' The problem is that CONFIG_NVME_TARGET_TCP_TLS is a 'bool' symbol that depends on the tristate CONFIG_NVME_TARGET_TCP, so any 'select' from it inherits the state of the tristate symbol rather than the intended CONFIG_NVME_TARGET one that contains the actual call. The same thing is true for CONFIG_KEYS, which itself is required for NVME_KEYRING. Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent d78abcb commit 65e2a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nvme/target/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ config NVME_TARGET
44
tristate "NVMe Target support"
55
depends on BLOCK
66
depends on CONFIGFS_FS
7+
select NVME_KEYRING if NVME_TARGET_TCP_TLS
8+
select KEYS if NVME_TARGET_TCP_TLS
79
select BLK_DEV_INTEGRITY_T10 if BLK_DEV_INTEGRITY
810
select SGL_ALLOC
911
help
@@ -87,9 +89,7 @@ config NVME_TARGET_TCP
8789
config NVME_TARGET_TCP_TLS
8890
bool "NVMe over Fabrics TCP target TLS encryption support"
8991
depends on NVME_TARGET_TCP
90-
select NVME_KEYRING
9192
select NET_HANDSHAKE
92-
select KEYS
9393
help
9494
Enables TLS encryption for the NVMe TCP target using the netlink handshake API.
9595

0 commit comments

Comments
 (0)