Return-Path: Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:28842 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbdLBPya (ORCPT ); Sat, 2 Dec 2017 10:54:30 -0500 From: alexander.levin@verizon.com Cc: Majd Dibbiny , Leon Romanovsky , "Doug Ledford" , alexander.levin@verizon.com To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.4 17/20] IB/mlx5: Assign send CQ and recv CQ of UMR QP Date: Sat, 2 Dec 2017 15:53:01 +0000 Message-ID: <20171202155243.7774-17-alexander.levin@verizon.com> References: <20171202155243.7774-1-alexander.levin@verizon.com> In-Reply-To: <20171202155243.7774-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Majd Dibbiny [ 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 Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mlx5/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5= /main.c index 2a1fdcaa3044..dbd5adc62c3f 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1123,6 +1123,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev) qp->real_qp =3D qp; qp->uobject =3D NULL; qp->qp_type =3D MLX5_IB_QPT_REG_UMR; + qp->send_cq =3D init_attr->send_cq; + qp->recv_cq =3D init_attr->recv_cq; =20 attr->qp_state =3D IB_QPS_INIT; attr->port_num =3D 1; --=20 2.11.0