Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-02-19 11:38:09 +0100
committerDenis Kirjanov <dkirjanov@suse.com>2019-02-19 15:34:51 +0100
commitc5f58b3c22d96c3faa3d14c18850d983a4df4e8d (patch)
tree3f8f6f3e09a3734d30e6455553ecac0302e68918
parent59d9c365789937ed57354aa8c5aa08e538b4d395 (diff)
bnxt_re: Fix couple of memory leaks that could lead to IOMMU call traces (bsc#1020413, FATE#321905).
-rw-r--r--patches.drivers/bnxt_re-Fix-couple-of-memory-leaks-that-could-lead-t.patch44
-rw-r--r--series.conf1
2 files changed, 45 insertions, 0 deletions
diff --git a/patches.drivers/bnxt_re-Fix-couple-of-memory-leaks-that-could-lead-t.patch b/patches.drivers/bnxt_re-Fix-couple-of-memory-leaks-that-could-lead-t.patch
new file mode 100644
index 0000000000..c247b20a9c
--- /dev/null
+++ b/patches.drivers/bnxt_re-Fix-couple-of-memory-leaks-that-could-lead-t.patch
@@ -0,0 +1,44 @@
+From: Somnath Kotur <somnath.kotur@broadcom.com>
+Date: Wed, 5 Sep 2018 13:20:34 +0530
+Subject: bnxt_re: Fix couple of memory leaks that could lead to IOMMU call
+ traces
+Patch-mainline: v4.19-rc4
+Git-commit: f40f299bbe806a2e2c8b0d7cdda822fa3bdd171b
+References: bsc#1020413, FATE#321905
+
+1. DMA-able memory allocated for Shadow QP was not being freed.
+2. bnxt_qplib_alloc_qp_hdr_buf() had a bug wherein the SQ pointer was
+ erroneously pointing to the RQ. But since the corresponding
+ free_qp_hdr_buf() was correct, memory being free was less than what was
+ allocated.
+
+Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
+Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Denis Kirjanov <dkirjanov@suse.com>
+---
+ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 ++
+ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
++++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+@@ -864,6 +864,8 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_
+ "Failed to destroy Shadow QP");
+ return rc;
+ }
++ bnxt_qplib_free_qp_res(&rdev->qplib_res,
++ &rdev->qp1_sqp->qplib_qp);
+ mutex_lock(&rdev->qp_lock);
+ list_del(&rdev->qp1_sqp->list);
+ atomic_dec(&rdev->qp_count);
+--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
++++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+@@ -186,7 +186,7 @@ static int bnxt_qplib_alloc_qp_hdr_buf(s
+ struct bnxt_qplib_qp *qp)
+ {
+ struct bnxt_qplib_q *rq = &qp->rq;
+- struct bnxt_qplib_q *sq = &qp->rq;
++ struct bnxt_qplib_q *sq = &qp->sq;
+ int rc = 0;
+
+ if (qp->sq_hdr_buf_size && sq->hwq.max_elements) {
diff --git a/series.conf b/series.conf
index 02693b6b6e..f2a9e8ac5c 100644
--- a/series.conf
+++ b/series.conf
@@ -24048,6 +24048,7 @@
patches.fixes/cifs-connect-to-servername-instead-of-IP-for-IPC-share.patch
patches.fixes/ceph-avoid-a-use-after-free-in-ceph_destroy_options.patch
patches.arch/0006-kvm-x86-do-not-re-try-execute-after-failed-emulation-in-l2
+ patches.drivers/bnxt_re-Fix-couple-of-memory-leaks-that-could-lead-t.patch
patches.arch/s390-sles12sp3-22-01-01-net-af_iucv-drop-inbound-packets-with-invalid-flags.patch
patches.arch/s390-sles12sp3-22-01-02-net-af_iucv-fix-skb-handling-on-HiperTransport-xmit-.patch
patches.drivers/net-ena-fix-surprise-unplug-NULL-dereference-kernel-.patch