Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1527438pxb; Thu, 16 Sep 2021 09:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaJCIx2qCOp8XO8D9Qrco/xsFhVKj9d/BjwwemUbB6SYmaPS4IYMzvFf7FnZ61/Wv7jUIQ X-Received: by 2002:a50:ab18:: with SMTP id s24mr7458965edc.88.1631808968356; Thu, 16 Sep 2021 09:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631808968; cv=none; d=google.com; s=arc-20160816; b=mHEodyj2AosK3v5DGN/rBx20LThliOCGr+cdpkzZMaMiXMDjjlV8WczZScJsqH2d1D 8GREViaFCfnyd6DIKv4V8g0V8firq8cLenjj+IFFWEtoXmIGymoHsoV/xyGs75YOr+am 97oWMp0ARV/cZHu4lE7ZnHqAgDg9VJbgtUWSauYI1OVjgoTJRbjjQ6wgJTJGnNy3wMHU GOx1Y4OLNp1v8O+EtlNTdkiivlfsFBlEAtWEoEtNbs3XRFAZb2RqIJ38rOL+szG4zB3D Nv7LulaeWk+W4px76ghbRNYOwCHSKV2v23eUQczDvrfcTQ+wuMySMcWgxa+u/t8PUsAZ iyRQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bsRbbVCRhDLB8f0MOi6J9Vo0CIiftxMMqr3B8102Odo=; b=Brq0jV70Mxz50BBwjxnDkgXVNae2b4ep+Sfcg8A+Xthv9pAux8nqd2tZADwQm0Wwew AhlVbg+jh1nGzdRzuZE0Py75V/3wCxKjWIcfsFQskziTwo0qktlHEBM0RFxJSjK6/Ijq 5xglgGdmC7+k9+OQjUVifY45UVQk/QoP9/fspfoQ4lE5DYbZhXZtbUanNgdjABAvSDxy WN4qfuBsOzNqSve+ERwy/2LtnToDACt/zW+6/0kERcWahcvAZgzHFG/6k5h1AuWjPiCs 0+U+jIUPqBWLqX6S+iIPPcJW54p4n8Yc3iM47Dd94Nrq/KsIQKOOLDdNKwnuWJyc6PfO rcLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UD8lZopF; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z29si3803043ejl.555.2021.09.16.09.15.41; Thu, 16 Sep 2021 09:16:08 -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=@linuxfoundation.org header.s=korg header.b=UD8lZopF; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240587AbhIPQOQ (ORCPT + 99 others); Thu, 16 Sep 2021 12:14:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:48798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232361AbhIPQI3 (ORCPT ); Thu, 16 Sep 2021 12:08:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 624BA61246; Thu, 16 Sep 2021 16:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808428; bh=/qqeetjdshUCj/1BwxVNyM1IviDio7qpDkqnu228bEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UD8lZopFaCB26HJvinBuMJrxYUfVmhalTkIZ43H7012k0ydN3l2f4qv2imIaPfBVb pdOnNtIjH5KpYE1tKAk97xk3wR9RqgOMK0c6F/QRC2T90RAU2v/u7Zuo9pnQ7JQnHr EvReYDXGopCOfbpxjqpxgyGCk9P39zkBdEtbNN74= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 070/306] RDMA/mlx5: Delete not-available udata check Date: Thu, 16 Sep 2021 17:56:55 +0200 Message-Id: <20210916155756.439795641@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky [ Upstream commit 5f6bb7e32283b8e3339b7adc00638234ac199cc4 ] 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") Link: https://lore.kernel.org/r/b68228597e730675020aa5162745390a2d39d3a2.1628014762.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- 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 8beba002e5dd..011477356a1d 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -1842,7 +1842,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; @@ -1862,8 +1861,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.30.2