Return-Path: Received: from mail-sn1nam02on0136.outbound.protection.outlook.com ([104.47.36.136]:55810 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932574AbeARVEm (ORCPT ); Thu, 18 Jan 2018 16:04:42 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Majd Dibbiny , Leon Romanovsky , "Doug Ledford" , Sasha Levin Subject: [added to the 4.1 stable tree] IB/mlx5: Assign send CQ and recv CQ of UMR QP Date: Thu, 18 Jan 2018 21:01:11 +0000 Message-ID: <20180118205908.3220-202-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.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 This patch has been added to the stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ 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 57c9809e8b87..031801671b80 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1020,6 +1020,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