RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_member
authorWeihang Li <liweihang@huawei.com>
Fri, 28 May 2021 09:37:35 +0000 (17:37 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 8 Jun 2021 17:43:56 +0000 (14:43 -0300)
commitcd74db6cbb1e5a9d9103ccb41aca777d0e4298cd
tree2298204ed7ba460b7dd665b88b940a2903cdc6d2
parent6448508076bf1e2b9133b34e51c7170b335b9abf
RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_member

The refcount_t API will WARN on underflow and overflow of a reference
counter, and avoid use-after-free risks.

Link: https://lore.kernel.org/r/1622194663-2383-5-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/multicast.c