]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
IB/mlx5: Assign send CQ and recv CQ of UMR QP
authorMajd Dibbiny <majd@mellanox.com>
Mon, 30 Oct 2017 12:23:13 +0000 (14:23 +0200)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 17 Jan 2018 17:55:29 +0000 (12:55 -0500)
[ Upstream commit 31fde034a8bd964a5c7c1a5663fc87a913158db2 ]

The UMR's QP is created by calling mlx5_ib_create_qp directly, and
therefore the send CQ and the recv CQ on the ibqp weren't assigned.

Assign them right after calling the mlx5_ib_create_qp to assure
that any access to those pointers will work as expected and won't
crash the system as might happen as part of reset flow.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/infiniband/hw/mlx5/main.c

index 57c9809e8b8774e8aac47806134216ef97c46883..031801671b80da8cec92d35f8c0ea5014611405c 100644 (file)
@@ -1020,6 +1020,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev)
        qp->real_qp    = qp;
        qp->uobject    = NULL;
        qp->qp_type    = MLX5_IB_QPT_REG_UMR;
+       qp->send_cq    = init_attr->send_cq;
+       qp->recv_cq    = init_attr->recv_cq;
 
        attr->qp_state = IB_QPS_INIT;
        attr->port_num = 1;