[PATCH v3 0/4] smb: smbdirect/client/server: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*) checks
Steve French
smfrench at gmail.com
Fri Nov 28 18:05:12 UTC 2025
i only see changes in two of the patches (see below) - will update
ksmbd-for-next to include the version from your branch
(for-6.19/fs-smb-20251128-v5). Does that match what you saw?
smfrench at smfrench-ThinkPad-P16s-Gen-2:~/smb3-kernel/6-11-27-25$ diff
0004-smb-server-relax-WARN_ON_ONCE-SMBDIRECT_SOCKET_-chec.patch
~/metze/wip/197/0039-smb-server-relax-WARN_ON_ONCE-SMBDIRECT_SOCKET_-chec.patch
1c1
< From 225825bffc9602e34e26199f1c635ee59c5de2e4 Mon Sep 17 00:00:00 2001
---
> From 0ee0418c34b31975ffe76d8d6d93ebbe9600c532 Mon Sep 17 00:00:00 2001
3,4c3,4
< Date: Tue, 25 Nov 2025 09:55:56 +0100
< Subject: [PATCH 4/6] smb: server: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*)
---
> Date: Tue, 25 Nov 2025 15:21:53 +0100
> Subject: [PATCH 039/197] smb: server: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*)
168,169c168,169
< fs/smb/server/transport_rdma.c | 39 +++++++++++++++++++++++++++-------
< 1 file changed, 31 insertions(+), 8 deletions(-)
---
> fs/smb/server/transport_rdma.c | 40 +++++++++++++++++++++++++++-------
> 1 file changed, 32 insertions(+), 8 deletions(-)
172c172
< index e2be9a496154..2d360fd08f5f 100644
---
> index e2be9a496154..4e7ab8d9314f 100644
175c175,184
< @@ -231,6 +231,9 @@ static void
smb_direct_disconnect_rdma_work(struct work_struct *work)
---
> @@ -19,6 +19,8 @@
> #include <rdma/rdma_cm.h>
> #include <rdma/rw.h>
>
> +#define __SMBDIRECT_SOCKET_DISCONNECT(__sc) smb_direct_disconnect_rdma_connection(__sc)
> +
> #include "glob.h"
> #include "connection.h"
> #include "smb_common.h"
> @@ -231,6 +233,9 @@ static void smb_direct_disconnect_rdma_work(struct work_struct *work)
185c194
< @@ -241,9 +244,6 @@ static void
smb_direct_disconnect_rdma_work(struct work_struct *work)
---
> @@ -241,9 +246,6 @@ static void smb_direct_disconnect_rdma_work(struct work_struct *work)
195,199c204
< @@ -284,9 +284,13 @@ static void
smb_direct_disconnect_rdma_work(struct work_struct *work)
< smb_direct_disconnect_wake_up_all(sc);
< }
<
< +#define __SMBDIRECT_SOCKET_DISCONNECT(__sc)
smb_direct_disconnect_rdma_connection(__sc)
---
> @@ -287,6 +289,9 @@ static void smb_direct_disconnect_rdma_work(struct work_struct *work)
209c214
< @@ -296,9 +300,6 @@ smb_direct_disconnect_rdma_connection(struct
smbdirect_socket *sc)
---
> @@ -296,9 +301,6 @@ smb_direct_disconnect_rdma_connection(struct smbdirect_socket *sc)
219c224
< @@ -639,7 +640,18 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)
---
> @@ -639,7 +641,18 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)
239c244
< @@ -1725,7 +1737,18 @@ static int smb_direct_cm_handler(struct
rdma_cm_id *cm_id,
---
> @@ -1725,7 +1738,18 @@ static int smb_direct_cm_handler(struct rdma_cm_id *cm_id,
smfrench at smfrench-ThinkPad-P16s-Gen-2:~/smb3-kernel/6-11-27-25$ diff
0005-smb-client-relax-WARN_ON_ONCE-SMBDIRECT_SOCKET_-chec.patch
~/metze/wip/197/0040-smb-client-relax-WARN_ON_ONCE-SMBDIRECT_SOCKET_-chec.patch
1c1
< From 76e8c8c28af17cf66e79beea48278dd5b5ed5d52 Mon Sep 17 00:00:00 2001
---
> From 1e5535ff36f83e8cd664fc6d9d318b482a0ff9d8 Mon Sep 17 00:00:00 2001
3,4c3,4
< Date: Tue, 25 Nov 2025 09:55:57 +0100
< Subject: [PATCH 5/6] smb: client: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*)
---
> Date: Tue, 25 Nov 2025 15:21:54 +0100
> Subject: [PATCH 040/197] smb: client: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*)
46c46
< index c6c428c2e08d..9ee8d1048284 100644
---
> index c6c428c2e08d..788a0670c4a8 100644
49c49,57
< @@ -186,6 +186,9 @@ static void smbd_disconnect_rdma_work(struct
work_struct *work)
---
> @@ -7,6 +7,7 @@
> #include <linux/module.h>
> #include <linux/highmem.h>
> #include <linux/folio_queue.h>
> +#define __SMBDIRECT_SOCKET_DISCONNECT(__sc) smbd_disconnect_rdma_connection(__sc)
> #include "../common/smbdirect/smbdirect_pdu.h"
> #include "smbdirect.h"
> #include "cifs_debug.h"
> @@ -186,6 +187,9 @@ static void smbd_disconnect_rdma_work(struct work_struct *work)
59c67
< @@ -197,9 +200,6 @@ static void smbd_disconnect_rdma_work(struct
work_struct *work)
---
> @@ -197,9 +201,6 @@ static void smbd_disconnect_rdma_work(struct work_struct *work)
69,71c77
< @@ -240,8 +240,12 @@ static void smbd_disconnect_rdma_work(struct
work_struct *work)
< smbd_disconnect_wake_up_all(sc);
< }
---
> @@ -242,6 +243,9 @@ static void smbd_disconnect_rdma_work(struct work_struct *work)
73d78
< +#define __SMBDIRECT_SOCKET_DISCONNECT(__sc)
smbd_disconnect_rdma_connection(__sc)
On Fri, Nov 28, 2025 at 4:17 AM Stefan Metzmacher <metze at samba.org> wrote:
>
> Am 28.11.25 um 05:53 schrieb Steve French:
> > On Thu, Nov 27, 2025 at 9:19 PM Namjae Jeon <linkinjeon at kernel.org> wrote:
> >
> >> On Fri, Nov 28, 2025 at 12:54 AM Stefan Metzmacher <metze at samba.org>
> >> wrote:
> >>>
> >>> Am 26.11.25 um 02:07 schrieb Namjae Jeon:
> >>>> On Wed, Nov 26, 2025 at 8:50 AM Namjae Jeon <linkinjeon at kernel.org>
> >> wrote:
> >>>>>
> >>>>> On Tue, Nov 25, 2025 at 11:22 PM Stefan Metzmacher <metze at samba.org>
> >> wrote:
> >>>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> here are some small cleanups for a problem Nanjae reported,
> >>>>>> where two WARN_ON_ONCE(sc->status != ...) checks where triggered
> >>>>>> by a Windows 11 client.
> >>>>>>
> >>>>>> The patches should relax the checks if an error happened before,
> >>>>>> they are intended for 6.18 final, as far as I can see the
> >>>>>> problem was introduced during the 6.18 cycle only.
> >>>>>>
> >>>>>> Given that v1 of this patchset produced a very useful WARN_ONCE()
> >>>>>> message, I'd really propose to keep this for 6.18, also for the
> >>>>>> client where the actual problem may not exists, but if they
> >>>>>> exist, it will be useful to have the more useful messages
> >>>>>> in 6.16 final.
> >>>> Anyway, Applied this patch-set to #ksmbd-for-next-next.
> >>>> Please check the below issue.
> >>>
> >>> Steve, can you move this into ksmbd-for-next?
> >> Steve, There are more patches in ksmbd-for-next-next.
> >> Please apply the following 6 patches in #ksmbd-for-next-next to
> >> #ksmbd-for-next.
> >>
> >> 3858665313f1 (HEAD -> ksmbd-for-next-next, origin/ksmbd-for-next-next)
> >> ksmbd: ipc: fix use-after-free in ipc_msg_send_request
> >> b9c7d4fe6e93 smb: client: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*)
> >> checks in recv_done() and smbd_conn_upcall()
> >> 6c5ceb636d08 smb: server: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*)
> >> checks in recv_done() and smb_direct_cm_handler()
> >> d02a328304e5 smb: smbdirect: introduce
> >> SMBDIRECT_CHECK_STATUS_{WARN,DISCONNECT}()
> >> 340255e842d5 smb: smbdirect: introduce SMBDIRECT_DEBUG_ERR_PTR() helper
> >> 01cba263d1bd ksmbd: vfs: fix race on m_flags in vfs_cache
>
> It seems these are the v2 patches, please use v3,
> the difference is that the __SMBDIRECT_SOCKET_DISCONNECT
> defines are moved up in order to let the patches on top work
> with out modifications. I noticed the difference while
> doing a rebase on ksmbd-for-next and get conflicts.
>
> Thanks!
> metze
>
--
Thanks,
Steve
More information about the samba-technical
mailing list