From: Arnd Bergmann <arnd@kernel.org>
To: Steve French <sfrench@samba.org>,
Namjae Jeon <linkinjeon@kernel.org>,
Stefan Metzmacher <metze@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Paulo Alcantara <pc@manguebit.org>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Eric Biggers <ebiggers@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>,
linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] smb: fix smbdirect link failure
Date: Fri, 6 Mar 2026 15:44:04 +0100 [thread overview]
Message-ID: <20260306144415.3402532-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
When CONFIG_INFINIBAND is set to =m, it is not possible to have SMBDIRECT
built-in, and it turns into a loadable module, but this does not prevent
CIFS and SMB_SERVER from being built-in, which in turn causes this
link error:
ld.lld-22: error: undefined symbol: smbdirect_socket_release
>>> referenced by smbdirect.c:212 (fs/smb/client/smbdirect.c:212)
>>> fs/smb/client/smbdirect.o:(smbd_destroy) in archive vmlinux.a
>>> referenced by smbdirect.c:212 (fs/smb/client/smbdirect.c:212)
>>> fs/smb/client/smbdirect.o:(smbd_reconnect) in archive vmlinux.a
>>> referenced by smbdirect.c:338 (fs/smb/client/smbdirect.c:338)
>>> fs/smb/client/smbdirect.o:(smbd_get_connection) in archive vmlinux.a
Enforce the dependency at Kconfig level, so that the respective smpdirect
options are only offered if it's possible to link against the common
module and infiniband.
Fixes: 28504d6ee127 ("smb: client: make use of smbdirect.ko")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/smb/client/Kconfig | 1 +
fs/smb/server/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/fs/smb/client/Kconfig b/fs/smb/client/Kconfig
index 72f47669da0c..981b3b5be09b 100644
--- a/fs/smb/client/Kconfig
+++ b/fs/smb/client/Kconfig
@@ -182,6 +182,7 @@ if CIFS
config CIFS_SMB_DIRECT
bool "SMB Direct support"
depends on CIFS && INFINIBAND && INFINIBAND_ADDR_TRANS
+ depends on CIFS=m || INFINIBAND=y
select SMB_COMMON_SMBDIRECT
help
Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
diff --git a/fs/smb/server/Kconfig b/fs/smb/server/Kconfig
index b084071d2442..5c77c5552ed8 100644
--- a/fs/smb/server/Kconfig
+++ b/fs/smb/server/Kconfig
@@ -49,6 +49,7 @@ if SMB_SERVER
config SMB_SERVER_SMBDIRECT
bool "Support for SMB Direct protocol"
depends on SMB_SERVER && INFINIBAND && INFINIBAND_ADDR_TRANS
+ depends on SMB_SERVER=m || INFINIBAND=y
select SMB_COMMON_SMBDIRECT
default n
--
2.39.5
next reply other threads:[~2026-03-06 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 14:44 Arnd Bergmann [this message]
2026-03-06 15:29 ` [PATCH] smb: fix smbdirect link failure Stefan Metzmacher
2026-03-08 3:10 ` Steve French
2026-03-07 2:56 ` Namjae Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260306144415.3402532-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bharathsm@microsoft.com \
--cc=ebiggers@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=senozhatsky@chromium.org \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.