[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200902165741.8355-4-michal.kalderon@marvell.com>
Date: Wed, 2 Sep 2020 19:57:36 +0300
From: Michal Kalderon <michal.kalderon@...vell.com>
To: <mkalderon@...vell.com>, <aelior@...vell.com>,
<dledford@...hat.com>, <jgg@...pe.ca>, <davem@...emloft.net>
CC: <linux-rdma@...r.kernel.org>, <netdev@...r.kernel.org>,
Michal Kalderon <michal.kalderon@...vell.com>
Subject: [PATCH rdma-next 3/8] RDMA/qedr: Fix use of uninitialized field
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@...vell.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
Powered by blists - more mailing lists