Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-06-07 13:27:44 +0200
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-06-07 13:29:15 +0200
commit963264a92d87702bebde9831d6e6e229f325617b (patch)
treec3998065022c183d0fe5ca8584416d2537e59c54
parent0712e2d32715e3d7340cf72a36ebd06177105702 (diff)
RDMA/hns: Set allocated memory to zero for wrid (bsc#1104427
FATE#326416 bsc#1137236).
-rw-r--r--patches.drivers/RDMA-hns-Set-allocated-memory-to-zero-for-wrid.patch33
-rw-r--r--series.conf1
2 files changed, 34 insertions, 0 deletions
diff --git a/patches.drivers/RDMA-hns-Set-allocated-memory-to-zero-for-wrid.patch b/patches.drivers/RDMA-hns-Set-allocated-memory-to-zero-for-wrid.patch
new file mode 100644
index 0000000000..5141ca4e8d
--- /dev/null
+++ b/patches.drivers/RDMA-hns-Set-allocated-memory-to-zero-for-wrid.patch
@@ -0,0 +1,33 @@
+From: Yixian Liu <liuyixian@huawei.com>
+Date: Sun, 3 Feb 2019 16:13:05 +0800
+Subject: RDMA/hns: Set allocated memory to zero for wrid
+Patch-mainline: v5.1-rc1
+Git-commit: f7f27a5f03cc9f47cc14f75a5be25f0f26b1b5ff
+References: bsc#1104427 FATE#326416 bsc#1137236
+
+The memory allocated for wrid should be initialized to zero.
+
+Signed-off-by: Yixian Liu <liuyixian@huawei.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/infiniband/hw/hns/hns_roce_qp.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
++++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
+@@ -764,10 +764,10 @@ static int hns_roce_create_qp_common(str
+ goto err_mtt;
+ }
+
+- hr_qp->sq.wrid = kmalloc_array(hr_qp->sq.wqe_cnt, sizeof(u64),
+- GFP_KERNEL);
+- hr_qp->rq.wrid = kmalloc_array(hr_qp->rq.wqe_cnt, sizeof(u64),
+- GFP_KERNEL);
++ hr_qp->sq.wrid = kcalloc(hr_qp->sq.wqe_cnt, sizeof(u64),
++ GFP_KERNEL);
++ hr_qp->rq.wrid = kcalloc(hr_qp->rq.wqe_cnt, sizeof(u64),
++ GFP_KERNEL);
+ if (!hr_qp->sq.wrid || !hr_qp->rq.wrid) {
+ ret = -ENOMEM;
+ goto err_wrid;
diff --git a/series.conf b/series.conf
index aae4910af4..8ecc905e05 100644
--- a/series.conf
+++ b/series.conf
@@ -45506,6 +45506,7 @@
patches.drivers/RDMA-bnxt_re-fix-or-ing-of-data-into-an-uninitialize.patch
patches.drivers/RDMA-hns-Limit-minimum-ROCE-CQ-depth-to-64.patch
patches.drivers/RDMA-hns-Fix-the-state-of-rereg-mr.patch
+ patches.drivers/RDMA-hns-Set-allocated-memory-to-zero-for-wrid.patch
patches.drivers/RDMA-cxgb4-Remove-kref-accounting-for-sync-operation.patch
patches.drivers/iw_cxgb4-Make-function-read_tcb-static.patch
patches.drivers/RDMA-iwcm-Fix-string-truncation-error.patch