Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp171061pxx; Wed, 28 Oct 2020 01:30:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykQmjO2cgczGg0E/t0Toora3ZwiuZU6tyhd5sU/8kXprVKoqAGaJCnmWBwoGPDBHioDP7p X-Received: by 2002:a05:6402:1585:: with SMTP id c5mr6675601edv.278.1603873826843; Wed, 28 Oct 2020 01:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603873826; cv=none; d=google.com; s=arc-20160816; b=fj5kL6gHxdV0srvXW66GSJL2QYczKjnkLt4XUtijf2iUZVp0NsFvj1CdtyLmaArpd8 RWizXuDFMPC4egGEGnOpRotfEGJo3A959Ghmg6wKZ4LReBde5h2EmVsLGlmOiINb/GCC RRvB251sWVlw5aEYNghKHuwDHEl26i/I3Ek98x/C63KlELW2tALbnjr/s5xd43yGlQHJ 5LfMNN/1/e/dQzaIqYDgDf4pO/CtLbiQaJohz4hGew1NDHBuqi7HTQWboPxKD68E65gI bec2IYrh6B5yUQlfgQoEOyp8/HwrYq1pthIpPHCqtzqUAK2Kt2yeuOIXq9iYjTU5JEHR HPLw== 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=iE3VQXxeY8bLR4xXjN9jVVmhRYOBW1B7RFw2Ya61dSA=; b=BAVh355DCSWLGLwpUk3VlUmVSS83jtJwS7xiTa+oKHYSVfeDxbb3u0uqYBvJkTPbCU gifpNsgsPPSKTHrPgHpgbEMY1phjblYYJ2BQmZ2jUfPX+go+YxLeLZ1Y0AL3G9gKSwWN B0fTpM9cqMTNu2ASAKcRE4flVpSYLY2azJS2k0DOT1hR6ZtwISNvSVSdodJ8gfRjGFee nDHeCRtWwDmS0XJxtg4FI9ct9qojyPBzkcym7it/lMehakGhKm3Zigy9aMLjmT3K8kue vRj9/oTe9a9ihgxGZToUO89/gizdbxlLXt3Bh7UHZe9X06wdk5NektVot7f84LG43RpL k3dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TWFl0Erp; 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=fail (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 x26si2664388eds.99.2020.10.28.01.30.04; Wed, 28 Oct 2020 01:30:26 -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=default header.b=TWFl0Erp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160AbgJ0OEf (ORCPT + 99 others); Tue, 27 Oct 2020 10:04:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:52780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409635AbgJ0OE2 (ORCPT ); Tue, 27 Oct 2020 10:04:28 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CAD0C22264; Tue, 27 Oct 2020 14:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807468; bh=5aco8oy2BYD1OxtNSCSojJo7ns14PJmvsSfDuwe65NU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TWFl0Erp7uWavGW6uzzRJ/J1Ya1Jy+kpXkVQrUczM8UPY5WjbLvwShww43/pZm/jq AcC6un3enJb7bdLigZcI/aXEqO7bJ75HbS8ofBRnkJkR1qDynKzBAzDDujpMWkmrk5 0o9LPraB8ToFBd5fvEzNFgs4g5tpxDNRKjf+PQ38= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Kalderon , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.9 063/139] RDMA/qedr: Fix use of uninitialized field Date: Tue, 27 Oct 2020 14:49:17 +0100 Message-Id: <20201027134905.109080368@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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: Michal Kalderon [ Upstream commit a379ad54e55a12618cae7f6333fd1b3071de9606 ] dev->attr.page_size_caps was used uninitialized when setting device attributes Fixes: ec72fce401c6 ("qedr: Add support for RoCE HW init") Link: https://lore.kernel.org/r/20200902165741.8355-4-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/qedr/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c index f937873e93dfc..b95f1457c407d 100644 --- a/drivers/infiniband/hw/qedr/main.c +++ b/drivers/infiniband/hw/qedr/main.c @@ -527,7 +527,7 @@ static int qedr_set_device_attr(struct qedr_dev *dev) qed_attr = dev->ops->rdma_query_device(dev->rdma_ctx); /* Part 2 - check capabilities */ - page_size = ~dev->attr.page_size_caps + 1; + page_size = ~qed_attr->page_size_caps + 1; if (page_size > PAGE_SIZE) { DP_ERR(dev, "Kernel PAGE_SIZE is %ld which is smaller than minimum page size (%d) required by qedr\n", -- 2.25.1