]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: smbd: fix missing client's memory region invalidation
authorHyunchul Lee <hyc.lee@gmail.com>
Mon, 18 Dec 2023 15:32:42 +0000 (00:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:50 +0000 (10:41 +0100)
commit858b9644518f3b7b6e019fe5cebee15ff31eff04
tree4eaafae74ae84cf7d5f528ed0ef3781be38ee73a
parent51d0b879d6f54a0454ec0dbb4bceed2b819a6662
ksmbd: smbd: fix missing client's memory region invalidation

[ Upstream commit 2fd5dcb1c8ef96c9f0fa8bda53ca480524b80ae7 ]

if the Channel of a SMB2 WRITE request is
SMB2_CHANNEL_RDMA_V1_INVALIDTE, a client
does not invalidate its memory regions but
ksmbd must do it by sending a SMB2 WRITE response
with IB_WR_SEND_WITH_INV.

But if errors occur while processing a SMB2
READ/WRITE request, ksmbd sends a response
with IB_WR_SEND. So a client could use memory
regions already in use.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2pdu.c