]> www.infradead.org Git - users/dwmw2/linux.git/commit
ksmbd: Fix the missing xa_store error check
authorJinjie Ruan <ruanjinjie@huawei.com>
Sun, 27 Oct 2024 23:28:30 +0000 (08:28 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Sun, 27 Oct 2024 23:30:05 +0000 (08:30 +0900)
commit3abab905b14f4ba756d413f37f1fb02b708eee93
treef02c78285fb3782bffe2741f8c777ee033f65212
parent81983758430957d9a5cb3333fe324fd70cf63e7e
ksmbd: Fix the missing xa_store error check

xa_store() can fail, it return xa_err(-EINVAL) if the entry cannot
be stored in an XArray, or xa_err(-ENOMEM) if memory allocation failed,
so check error for xa_store() to fix it.

Cc: stable@vger.kernel.org
Fixes: b685757c7b08 ("ksmbd: Implements sess->rpc_handle_list as xarray")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/mgmt/user_session.c