diff options
author | Xiang Yang <xiangyang3@huawei.com> | 2023-08-04 10:25:25 +0800 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-08-07 16:49:59 +0300 |
commit | 26b7d1a27167e7adf75b150755e05d2bc123ce55 (patch) | |
tree | a3874c51ff290d9dcdbe805cbc1b8bc997c776fd /mm/msync.c | |
parent | 9e03dbea2b0634b21a45946b4f8097e0dc86ebe1 (diff) | |
download | linux-stable-26b7d1a27167e7adf75b150755e05d2bc123ce55.tar.gz linux-stable-26b7d1a27167e7adf75b150755e05d2bc123ce55.tar.bz2 linux-stable-26b7d1a27167e7adf75b150755e05d2bc123ce55.zip |
IB/uverbs: Fix an potential error pointer dereference
smatch reports the warning below:
drivers/infiniband/core/uverbs_std_types_counters.c:110
ib_uverbs_handler_UVERBS_METHOD_COUNTERS_READ() error: 'uattr'
dereferencing possible ERR_PTR()
The return value of uattr maybe ERR_PTR(-ENOENT), fix this by checking
the value of uattr before using it.
Fixes: ebb6796bd397 ("IB/uverbs: Add read counters support")
Signed-off-by: Xiang Yang <xiangyang3@huawei.com>
Link: https://lore.kernel.org/r/20230804022525.1916766-1-xiangyang3@huawei.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'mm/msync.c')
0 files changed, 0 insertions, 0 deletions