Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5213035pxv; Tue, 20 Jul 2021 23:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfEIOdu7i8zJMHLhfmVKe+Jki5Q0KxhdEagfm7A919KGC9VJBw5lwWnFEyM41q28gfr2Yq X-Received: by 2002:a92:905:: with SMTP id y5mr22966547ilg.222.1626848594886; Tue, 20 Jul 2021 23:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626848594; cv=none; d=google.com; s=arc-20160816; b=phAuY+wcDx6TMokyGLSUOYM32b8Hxyxv/iAfUdf5w8u8L4q/Xhn4dhVrbB2V6xD1n/ ki0uIcToghUfgT9ZYdbrNoRqlKKajrnlrhccm++gkUwzqRyPg2j+tnJTVeYTrr8pyhUR Njlnw6aJfZYJ9oL019LkrsV++7wFo7rqgLIQwmE06jLY/rx6uCk77YyysthY81YX5Kws isAEXRk1qh1Pl3gNAZiVguWMn+tA+Q9yH9CyqG74HoMCdtqIRwHTy9jxvBVhRZ2eDerI 9Niqqx6XUySTWNm+xjLamVmcaqWkk2sWkUfRFaoQfbTT0KO2L6CjRC9hg7Z0Th59XxN/ HS8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w08H5eeoVKbY3rMx8R73wY7lGndCvJCOCTr/DPu4L9U=; b=XOrknmkpJsR9hTqJ1i1O5LsAR16n+W80NbElHWLurg/Lw6kGCWatynmE4F1w+I4QmG 9b4SjfejknOm0BwzrffgSVofCCy6HWASFffvrEtYZczkrsZKSsKty5oESqmjGJsnnXo7 YatkxBRmNmk3qzjsoo7BrpqBIpns7HcsemsqDNItuOGhxeZUpWoplIxsz5ku6Lp29QCa qtdA94LEVi36N4tqU44MEFF4vjdaCDJHLU9s9Jap5GSW7AUm6YWMtbZ9pQGTNzBx1S5m Y1hOa2ydHd8GvFMUfp+ZgvL71EBv0HPBU2ZNEDxW3Pu4+sjsonfu0mIPEiBW7W7/yuVC 82bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PK7ouXDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si26483223ilp.102.2021.07.20.23.23.03; Tue, 20 Jul 2021 23:23:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PK7ouXDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234532AbhGUFir (ORCPT + 99 others); Wed, 21 Jul 2021 01:38:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:34272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233072AbhGUFcr (ORCPT ); Wed, 21 Jul 2021 01:32:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 57EA0600EF; Wed, 21 Jul 2021 06:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626848002; bh=5J+jBturQ/bt30k9Ss/DG7LeflH8jrxgH/e5dbAPOps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PK7ouXDOo62W01D6sVbVnrS2pT16/qoA962+b1M3VzX84/biS5+F7632/Zs1h8iPh TrSSLTuAXBRCqWY00foAkH1pW9Sczs7UYhR3PotNgSITjp+Ey73o9vR5Nz7keDwWTy d/A0NVk5IWfC+0Pr5kLtP2aEyRl5RJtkqUEL1wOYsstXVwHgFh6GTQWtwwuH9Wdzkc hr9SSxtZ4+mSTcDxJuiiPI6s+qDqZ4Mk8PL7wTGQLXgHmTYHQXTRTeNM/HXVvXNBht KAOxHyah6kz1r1kRkeacEIm4/wRtzewSqfcj1okMYqCKOwyQCjCBdHDcXdECPJBnqA QVMS5pE/74DHg== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Mark Zhang Subject: [PATCH rdma-next 1/7] RDMA/mlx5: Delete not-available udata check Date: Wed, 21 Jul 2021 09:13:00 +0300 Message-Id: <1c60391dd1a45130343675bc2c15a8239c217f5b.1626846795.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky XRC_TGT QPs are created through kernel verbs and don't have udata at all. Fixes: 6eefa839c4dd ("RDMA/mlx5: Protect from kernel crash if XRC_TGT doesn't have udata") Fixes: e383085c2425 ("RDMA/mlx5: Set ECE options during QP create") Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/qp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 18b018f1db83..81e3170a1ae6 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -1908,7 +1908,6 @@ static int get_atomic_mode(struct mlx5_ib_dev *dev, static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, struct mlx5_create_qp_params *params) { - struct mlx5_ib_create_qp *ucmd = params->ucmd; struct ib_qp_init_attr *attr = params->attr; u32 uidx = params->uidx; struct mlx5_ib_resources *devr = &dev->devr; @@ -1928,8 +1927,6 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, if (!in) return -ENOMEM; - if (MLX5_CAP_GEN(mdev, ece_support) && ucmd) - MLX5_SET(create_qp_in, in, ece, ucmd->ece_options); qpc = MLX5_ADDR_OF(create_qp_in, in, qpc); MLX5_SET(qpc, qpc, st, MLX5_QP_ST_XRC); -- 2.31.1