Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-02-16 10:00:00 +0100
committerDenis Kirjanov <dkirjanov@suse.com>2019-02-16 10:00:00 +0100
commitbd8264a92268bb2d070427f37ae5727997298810 (patch)
tree3b0398130ed21c664f8f44681ff50b5b10e1805a
parent96370bd87299c7a6883b3e2bf13818f60c8ba611 (diff)
IB/rxe: replace kvfree with vfree (FATE#322149).
-rw-r--r--patches.drivers/IB-rxe-replace-kvfree-with-vfree.patch67
-rw-r--r--series.conf1
2 files changed, 68 insertions, 0 deletions
diff --git a/patches.drivers/IB-rxe-replace-kvfree-with-vfree.patch b/patches.drivers/IB-rxe-replace-kvfree-with-vfree.patch
new file mode 100644
index 0000000000..bab443cd86
--- /dev/null
+++ b/patches.drivers/IB-rxe-replace-kvfree-with-vfree.patch
@@ -0,0 +1,67 @@
+From: Zhu Yanjun <yanjun.zhu@oracle.com>
+Date: Sun, 30 Sep 2018 01:57:42 -0400
+Subject: IB/rxe: replace kvfree with vfree
+Patch-mainline: v4.20-rc1
+Git-commit: 721ad7e643f7002efa398838693f90284ea216d1
+References: FATE#322149
+
+The buf is allocated by vmalloc_user in the function rxe_queue_init.
+So it is better to free it by vfree.
+
+Fixes: 8700e3e7c485 ("Soft RoCE driver")
+Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
+Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Denis Kirjanov <dkirjanov@suse.com>
+---
+ drivers/infiniband/sw/rxe/rxe_cq.c | 3 ++-
+ drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/infiniband/sw/rxe/rxe_cq.c
++++ b/drivers/infiniband/sw/rxe/rxe_cq.c
+@@ -31,6 +31,7 @@
+ * SOFTWARE.
+ */
+
++#include <linux/vmalloc.h>
+ #include "rxe.h"
+ #include "rxe_loc.h"
+ #include "rxe_queue.h"
+@@ -97,7 +98,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe
+ err = do_mmap_info(rxe, udata, false, context, cq->queue->buf,
+ cq->queue->buf_size, &cq->queue->ip);
+ if (err) {
+- kvfree(cq->queue->buf);
++ vfree(cq->queue->buf);
+ kfree(cq->queue);
+ return err;
+ }
+--- a/drivers/infiniband/sw/rxe/rxe_qp.c
++++ b/drivers/infiniband/sw/rxe/rxe_qp.c
+@@ -34,6 +34,7 @@
+ #include <linux/skbuff.h>
+ #include <linux/delay.h>
+ #include <linux/sched.h>
++#include <linux/vmalloc.h>
+
+ #include "rxe.h"
+ #include "rxe_loc.h"
+@@ -255,7 +256,7 @@ static int rxe_qp_init_req(struct rxe_de
+ qp->sq.queue->buf_size, &qp->sq.queue->ip);
+
+ if (err) {
+- kvfree(qp->sq.queue->buf);
++ vfree(qp->sq.queue->buf);
+ kfree(qp->sq.queue);
+ return err;
+ }
+@@ -307,7 +308,7 @@ static int rxe_qp_init_resp(struct rxe_d
+ qp->rq.queue->buf_size,
+ &qp->rq.queue->ip);
+ if (err) {
+- kvfree(qp->rq.queue->buf);
++ vfree(qp->rq.queue->buf);
+ kfree(qp->rq.queue);
+ return err;
+ }
diff --git a/series.conf b/series.conf
index 3cdc2345bc..08dc52d312 100644
--- a/series.conf
+++ b/series.conf
@@ -24139,6 +24139,7 @@
patches.suse/hwrng-core-document-the-quality-field.patch
patches.fixes/0001-cgroup-netclassid-add-a-preemption-point-to-write_cl.patch
patches.arch/kvm-nvmx-always-reflect-nm-vm-exits-to-l1
+ patches.drivers/IB-rxe-replace-kvfree-with-vfree.patch
patches.drivers/ib_srp-Remove-WARN_ON-in-srp_terminate_io.patch
patches.suse/uio-make-symbol-uio_class_registered-static.patch
patches.drivers/iommu-arm-smmu-ensure-that-page-table-updates-are-visible-before-tlbi