Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp593196pxx; Wed, 28 Oct 2020 11:56:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxTTkRKva6Zq0vVZ0Nb++2pkzhnEB1opBOG72gzhYDwph2F3DIjySAcgHvGu8O0am9GbRx X-Received: by 2002:a50:e887:: with SMTP id f7mr326975edn.276.1603911410168; Wed, 28 Oct 2020 11:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603911410; cv=none; d=google.com; s=arc-20160816; b=TmTrNH1jUBUc9tJL1zP2unXdxt/0aYKTUS2RBFB5O0v0M+w9KJD+UZPMdoxMDp9qt8 4EXQzvbdguUzDGjAwpCwNGnPtsmm6H+1QN0ua90Wc53Xlt5hLdeqYZjXuDiitQJJH0QL q9oF9wy43P/wH53qZ9otHnC6e95q3GY6kFOiSs+cI8+dpjW2A1BXTN5bGoYpMMaWJoDo eYFhfDRhK4soJHrY+q1PSovYW+WtgTtfg3zOtC1ICQz93oAYXT/70rRBXQ1wCI2wJ/su rOXCnQDyzi4NpgFZfHpZ/DoYTgFioEj6xeIfmhNtPlU4iTFMcwqzDJm0Sw13BJzWxdYa zghQ== 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=/nr7xIPVTyhdmvDW0QCwu3z9PcjfZZlAV5vRqri0q28=; b=BUUcTA+t5j93b6bT6zEBEAiW9qcJCKuudC9HBsW1t8/zI0iYOu8+DEYD1gmQ6gGOmX 06CYjP4E5Sfh2BQVm9VvWrS5gD5mkrN7a7qXyldVoSlL536UvK7VrCebYdbvwWQD96hh JsRec5kT19CcGl39TY0VrZC91XipeiigMh4c4SYHmWr3yKO98/+nZDl6oXDNGxRC/8ab D/zRIcsdI+YJAG37kTSWH76sm1DD02YBQEU/pg2fjtdtD61f/HJVVfs+UCqprrJYBXGh 4iGZaYx4E+khsQsy8H7F1wKU9bACCpLwvnBQGzSSNMTtakZrXUru/P+n/6b+GoJbFwgS 4mzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xx3uPvUF; 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 n18si9672edr.422.2020.10.28.11.56.27; Wed, 28 Oct 2020 11:56:50 -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=Xx3uPvUF; 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 S2900551AbgJ0SQA (ORCPT + 99 others); Tue, 27 Oct 2020 14:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:33306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756248AbgJ0OMM (ORCPT ); Tue, 27 Oct 2020 10:12:12 -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 482EF218AC; Tue, 27 Oct 2020 14:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807932; bh=0PwGEYpf2+rOl5fs0/EGikixkqMcM8/NDGnXfSv46Kk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xx3uPvUFZuhRbS5bfmg81Q8F++bl7IJPcW9CrS6SO+ZnLQpG1tVkpevf6yL+i311Y 0u1JC/c7rSftjvkTOagvYQSxluzw7oWkjxeSGv86Ydbnvr3+1wL1mm134CRNfUIE9m YcLmk4cRvax9tIDpHtVasfvziVVR0Ya9VlDsYInU= 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.14 094/191] RDMA/qedr: Fix use of uninitialized field Date: Tue, 27 Oct 2020 14:49:09 +0100 Message-Id: <20201027134914.216231814@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@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 3e48ed64760b7..8c9e23d1f434e 100644 --- a/drivers/infiniband/hw/qedr/main.c +++ b/drivers/infiniband/hw/qedr/main.c @@ -548,7 +548,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