android_kernel_samsung_sm8650/fs/smb
Zizhi Wo a7e6477cc3 ksmbd: fix memory leak in smb2_lock()
[ Upstream commit 8f1752723019db900fb60a5b9d0dfd3a2bdea36c ]

In smb2_lock(), if setup_async_work() executes successfully,
work->cancel_argv will bind the argv that generated by kmalloc(). And
release_async_work() is called in ksmbd_conn_try_dequeue_request() or
smb2_lock() to release argv.
However, when setup_async_work function fails, work->cancel_argv has not
been bound to the argv, resulting in the previously allocated argv not
being released. Call kfree() to fix it.

Fixes: e2f34481b2 ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-20 17:00:14 +01:00
..
client cifs: Fix flushing, invalidation and file size with FICLONE 2023-12-13 18:39:28 +01:00
common send channel sequence number in SMB3 requests after reconnects 2023-09-19 12:27:56 +02:00
server ksmbd: fix memory leak in smb2_lock() 2023-12-20 17:00:14 +01:00
Kconfig smb: move client and server files to common directory fs/smb 2023-06-28 11:12:40 +02:00
Makefile smb: move client and server files to common directory fs/smb 2023-06-28 11:12:40 +02:00