]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: delete asynchronous work from list
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 31 Dec 2023 07:12:32 +0000 (16:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:18:28 +0000 (15:18 +0100)
commit8d271ef5e5cac8a470076891b248a28a2c57fb1e
treeb8a362953bbf9a67f75e67ef2e4c9d8a91a40ddc
parent4ef3fd2f85bb1bcaabb9fd2c5ad8d7d99d0c8e90
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: Sasha Levin <sashal@kernel.org>
fs/smb/server/connection.c
fs/smb/server/ksmbd_work.h
fs/smb/server/smb2pdu.c
fs/smb/server/smb2pdu.h