* [PATCH] smb: fix smbdirect link failure
@ 2026-03-06 14:44 Arnd Bergmann
2026-03-06 15:29 ` Stefan Metzmacher
2026-03-07 2:56 ` Namjae Jeon
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-03-06 14:44 UTC (permalink / raw)
To: Steve French, Namjae Jeon, Stefan Metzmacher
Cc: Arnd Bergmann, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N,
Tom Talpey, Bharath SM, Sergey Senozhatsky, Eric Biggers,
Ard Biesheuvel, linux-cifs, samba-technical, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] smb: fix smbdirect link failure
2026-03-06 14:44 [PATCH] smb: fix smbdirect link failure Arnd Bergmann
@ 2026-03-06 15:29 ` Stefan Metzmacher
2026-03-08 3:10 ` Steve French
2026-03-07 2:56 ` Namjae Jeon
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Metzmacher @ 2026-03-06 15:29 UTC (permalink / raw)
To: Arnd Bergmann, Steve French, Namjae Jeon
Cc: Arnd Bergmann, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N,
Tom Talpey, Bharath SM, Sergey Senozhatsky, Eric Biggers,
Ard Biesheuvel, linux-cifs, samba-technical, linux-kernel
Hi Arnd,
> 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")
Thanks for the fix!
Steve can you put that an top of ksmbd-for-next for the moment.
Then I'll squash the hunks in the correct patch and provide
a new branch, as the 2nd would have:
Fixes: 30807ad55601 ("smb: server: make use of smbdirect.ko")
But both hashes are unlikely be the ones landing upstream,
so as we do rebase anyway I'd squash them, but maybe
I'll have time for the rebase after -rc4.
So we should take it as is for now, but maybe without the
Fixes tag, but acked by me.
Thanks!
metze
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] smb: fix smbdirect link failure
2026-03-06 14:44 [PATCH] smb: fix smbdirect link failure Arnd Bergmann
2026-03-06 15:29 ` Stefan Metzmacher
@ 2026-03-07 2:56 ` Namjae Jeon
1 sibling, 0 replies; 4+ messages in thread
From: Namjae Jeon @ 2026-03-07 2:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Steve French, Stefan Metzmacher, Arnd Bergmann, Paulo Alcantara,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Sergey Senozhatsky, Eric Biggers, Ard Biesheuvel, linux-cifs,
samba-technical, linux-kernel
On Fri, Mar 6, 2026 at 11:44 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> 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>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] smb: fix smbdirect link failure
2026-03-06 15:29 ` Stefan Metzmacher
@ 2026-03-08 3:10 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2026-03-08 3:10 UTC (permalink / raw)
To: Stefan Metzmacher
Cc: Arnd Bergmann, Steve French, Namjae Jeon, Eric Biggers,
Shyam Prasad N, Paulo Alcantara, Arnd Bergmann, linux-cifs,
samba-technical, linux-kernel, Tom Talpey, Sergey Senozhatsky,
Bharath SM, Ard Biesheuvel
added the acked-by and merged into ksmbd-for-next
On Fri, Mar 6, 2026 at 9:30 AM Stefan Metzmacher via samba-technical
<samba-technical@lists.samba.org> wrote:
>
> Hi Arnd,
>
> > 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")
>
> Thanks for the fix!
>
> Steve can you put that an top of ksmbd-for-next for the moment.
> Then I'll squash the hunks in the correct patch and provide
> a new branch, as the 2nd would have:
>
> Fixes: 30807ad55601 ("smb: server: make use of smbdirect.ko")
>
> But both hashes are unlikely be the ones landing upstream,
> so as we do rebase anyway I'd squash them, but maybe
> I'll have time for the rebase after -rc4.
>
> So we should take it as is for now, but maybe without the
> Fixes tag, but acked by me.
>
> Thanks!
> metze
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-08 3:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 14:44 [PATCH] smb: fix smbdirect link failure Arnd Bergmann
2026-03-06 15:29 ` Stefan Metzmacher
2026-03-08 3:10 ` Steve French
2026-03-07 2:56 ` Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox