]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: delete asynchronous work from list
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Dec 2023 15:33:40 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:54 +0000 (10:41 +0100)
commit9494242c8e76e6a98c8ab5f6aed0fa4bd56ac6d5
tree66e5e34cc302abf6a597d19f7c9c58d70e4b953c
parent427caadf90e93c60c9b01aadf9fa3e16308f300e
ksmbd: delete asynchronous work from list

[ Upstream commit 3a9b557f44ea8f216aab515a7db20e23f0eb51b9 ]

When smb2_lock request is canceled by smb2_cancel or smb2_close(),
ksmbd is missing deleting async_request_entry async_requests list.
Because calling init_smb2_rsp_hdr() in smb2_lock() mark ->synchronous
as true and then it will not be deleted in
ksmbd_conn_try_dequeue_request(). This patch add release_async_work() to
release the ones allocated for async work.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/connection.c
fs/ksmbd/ksmbd_work.h
fs/ksmbd/smb2pdu.c
fs/ksmbd/smb2pdu.h