Commit aa495b92 authored by Weihang Li's avatar Weihang Li Committed by Greg Kroah-Hartman
Browse files

RDMA/hns: Use refcount_t APIs for HEM

[ Upstream commit 82eb481d ]

refcount_t is better than integer for reference counting, it will WARN on
overflow/underflow and avoid use-after-free risks.

Link: https://lore.kernel.org/r/1621589395-2435-5-git-send-email-liweihang@huawei.com


Signed-off-by: default avatarWeihang Li <liweihang@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Stable-dep-of: cf5b608f ("RDMA/hns: Fix hns_roce_table_get return value")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent de1049dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment