]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/hns: Fix accessing uninitialized resources
authorJunxian Huang <huangjunxian6@hisilicon.com>
Thu, 3 Jul 2025 11:39:03 +0000 (19:39 +0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 7 Jul 2025 05:37:35 +0000 (01:37 -0400)
commit278c18a4a78a9a6bf529ef45ccde512a5686ea9d
tree0c4eaf07311a8926cb55c86c6cb1950869cabd9c
parent2c2ec0106c0f1f12d4eefd11de318ac47557a750
RDMA/hns: Fix accessing uninitialized resources

hr_dev->pgdir_list and hr_dev->pgdir_mutex won't be initialized if
CQ/QP record db are not enabled, but they are also needed when using
SRQ with SRQ record db enabled. Simplified the logic by always
initailizing the reosurces.

Fixes: c9813b0b9992 ("RDMA/hns: Support SRQ record doorbell")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20250703113905.3597124-5-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_main.c