]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/bnxt_re: Add missing spin lock initialization
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 8 Oct 2018 10:27:52 +0000 (03:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:49:59 +0000 (14:49 +0100)
[ Upstream commit 5a23e0b1dd51fe0efae666b03fdb15e1301f437a ]

Add the missing initalization of the cq_lock and qplib.flush_lock.

Fixes: 942c9b6ca8de ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/qplib_fp.c

index a69632f1fab0b494bf1a5685504cf5b4382f8701..c9af2d139f5cb6084fefb07c911095fa9d894bc0 100644 (file)
@@ -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;
index c15335dc8f6146cf6395dba70846f6175eb148cc..60f2fb7e7dbfe4f1e483bc1ccaad8062caaa6486 100644 (file)
@@ -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;