smb: client: let recv_done() avoid touching data_transfer after cleanup/move
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Aug 2025 12:10:16 +0000 (14:10 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Aug 2025 20:04:13 +0000 (15:04 -0500)
commit24eff17887cb45c25a427e662dda352973c5c171
tree0483d4403f9d973e484866aae86cdb54a990f443
parentbdd7afc6dca5e0ebbb75583484aa6ea9e03fbb13
smb: client: let recv_done() avoid touching data_transfer after cleanup/move

Calling enqueue_reassembly() and wake_up_interruptible(&info->wait_reassembly_queue)
or put_receive_buffer() means the response/data_transfer pointer might
get re-used by another thread, which means these should be
the last operations before calling return.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Fixes: f198186aa9bb ("CIFS: SMBD: Establish SMB Direct connection")
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smbdirect.c