linux/drivers/infiniband
wenglianfa fd8489294d RDMA/hns: Fix Use-After-Free of rsv_qp on HIP08
Currently rsv_qp is freed before ib_unregister_device() is called
on HIP08. During the time interval, users can still dereg MR and
rsv_qp will be used in this process, leading to a UAF. Move the
release of rsv_qp after calling ib_unregister_device() to fix it.

Fixes: 70f9252158 ("RDMA/hns: Use the reserved loopback QPs to free MR before destroying MPT")
Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20240906093444.3571619-3-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-09-10 16:06:39 +03:00
..
core IB/core: Fix ib_cache_setup_one error flow cleanup 2024-09-04 10:33:09 +03:00
hw RDMA/hns: Fix Use-After-Free of rsv_qp on HIP08 2024-09-10 16:06:39 +03:00
sw RDMA/rdmavt: Convert to use ERR_CAST() 2024-09-02 10:09:42 +03:00
ulp RDMA/rtrs-clt: Remove an extra space 2024-08-28 15:24:35 +03:00
Kconfig RDMA: Disable IB HW for UML 2022-12-04 15:22:03 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00