]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset
authorChengchang Tang <tangchengchang@huawei.com>
Fri, 27 Sep 2024 10:33:23 +0000 (18:33 +0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 7 Oct 2024 05:53:23 +0000 (08:53 +0300)
commit615b94746a54702af923b28bd8a629f4ac0ff0d8
tree34fc00c2942cb684280f008f959ad5382f438746
parent51976c6cd786151b6a1bdf8b8b3334beac0ba99c
RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset

When HW is being reset, userspace should not ring doorbell otherwise
it may lead to abnormal consequence such as RAS.

Disassociate mmap pages for all uctx to prevent userspace from ringing
doorbell to HW. Since all resources will be destroyed during HW reset,
no new mmap is allowed after HW reset is completed.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20240927103323.1897094-3-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_main.c