All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kalderon <michal.kalderon@marvell.com>
To: <mkalderon@marvell.com>, <aelior@marvell.com>,
	<dledford@redhat.com>, <jgg@ziepe.ca>, <davem@davemloft.net>
Cc: <linux-rdma@vger.kernel.org>, <netdev@vger.kernel.org>,
	Michal Kalderon <michal.kalderon@marvell.com>
Subject: [PATCH rdma-next 3/8] RDMA/qedr: Fix use of uninitialized field
Date: Wed, 2 Sep 2020 19:57:36 +0300	[thread overview]
Message-ID: <20200902165741.8355-4-michal.kalderon@marvell.com> (raw)
In-Reply-To: <20200902165741.8355-1-michal.kalderon@marvell.com>

dev->attr.page_size_caps was used uninitialized
when setting device attributes

Fixes: ec72fce401c6 ("qedr: Add support for RoCE HW init")
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
---
 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 d85f992bac29..8e1365951fb6 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -602,7 +602,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.14.5


  parent reply	other threads:[~2020-09-02 17:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 16:57 [PATCH rdma-next 0/8] RDMA/qedr: various fixes Michal Kalderon
2020-09-02 16:57 ` [PATCH rdma-next 1/8] RDMA/qedr: Fix qp structure memory leak Michal Kalderon
2020-09-02 16:57 ` [PATCH rdma-next 2/8] RDMA/qedr: Fix doorbell setting Michal Kalderon
2020-09-02 16:57 ` Michal Kalderon [this message]
2020-09-02 16:57 ` [PATCH rdma-next 4/8] RDMA/qedr: Fix return code if accept is called on a destroyed qp Michal Kalderon
2020-09-02 16:57 ` [PATCH rdma-next 5/8] qede: Notify qedr when mtu has changed Michal Kalderon
2020-09-02 16:57 ` [PATCH rdma-next 6/8] RDMA/qedr: Fix iWARP active mtu display Michal Kalderon
2020-09-02 16:57 ` [PATCH rdma-next 7/8] RDMA/qedr: Fix inline size returned for iWARP Michal Kalderon
2020-09-02 16:57 ` [PATCH rdma-next 8/8] RDMA/qedr: Fix function prototype parameters alignment Michal Kalderon
2020-09-09 19:15 ` [PATCH rdma-next 0/8] RDMA/qedr: various fixes Jason Gunthorpe
2020-09-10  6:29   ` [EXT] " Michal Kalderon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200902165741.8355-4-michal.kalderon@marvell.com \
    --to=michal.kalderon@marvell.com \
    --cc=aelior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mkalderon@marvell.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.