提交 bbf0bc00 编写于 作者: S Selvin Xavier 提交者: Xie XiuQi

RDMA/bnxt_re: Add missing spin lock initialization

mainline inclusion
from mainline-4.20-rc1
commit 5a23e0b1dd51fe0efae666b03fdb15e1301f437a
category: bugfix
bugzilla: 6717
CVE: NA

-----------------------------

Since any page fault may be interrupted by a MMU invalidation and implicit
Add the missing initalization of the cq_lock and qplib.flush_lock.

Fixes: 942c9b6c ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing")
Signed-off-by: NSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: NJing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 b7a371e5
......@@ -2664,6 +2664,7 @@ struct ib_cq *bnxt_re_create_cq(struct ib_device *ibdev,
nq->budget++;
atomic_inc(&rdev->cq_count);
spin_lock_init(&cq->cq_lock);
if (context) {
struct bnxt_re_cq_resp resp;
......
......@@ -1970,6 +1970,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
INIT_LIST_HEAD(&cq->sqf_head);
INIT_LIST_HEAD(&cq->rqf_head);
spin_lock_init(&cq->compl_lock);
spin_lock_init(&cq->flush_lock);
bnxt_qplib_arm_cq_enable(cq);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册