ksmbd: delete asynchronous work from list
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 30 Mar 2023 23:42:12 +0000 (08:42 +0900)
committerSteve French <stfrench@microsoft.com>
Mon, 3 Apr 2023 04:08:52 +0000 (23:08 -0500)
commit3a9b557f44ea8f216aab515a7db20e23f0eb51b9
tree5a2587229b6511c14ef5f549fadcd2be083e58bd
parent2824861773eb512b37547516d81ef78108032cb2
ksmbd: delete asynchronous work from list

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>
fs/ksmbd/connection.c
fs/ksmbd/ksmbd_work.h
fs/ksmbd/smb2pdu.c
fs/ksmbd/smb2pdu.h