Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:08:48 +0100
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:09:46 +0100
commit01d5725573d4f0eba010c95343adc2031f81fe1b (patch)
treee2e7c9124d0bdde4722601b43349bd7258c95315
parent2250b6bd8e97b42058d4172d73909981a7792bc2 (diff)
net/mlx5e: Replace kfree with kvfree when free vhca stats
(jsc#SLE-8464).
-rw-r--r--patches.suse/net-mlx5e-Replace-kfree-with-kvfree-when-free-vhca-s.patch35
-rw-r--r--series.conf1
2 files changed, 36 insertions, 0 deletions
diff --git a/patches.suse/net-mlx5e-Replace-kfree-with-kvfree-when-free-vhca-s.patch b/patches.suse/net-mlx5e-Replace-kfree-with-kvfree-when-free-vhca-s.patch
new file mode 100644
index 0000000000..26a9823115
--- /dev/null
+++ b/patches.suse/net-mlx5e-Replace-kfree-with-kvfree-when-free-vhca-s.patch
@@ -0,0 +1,35 @@
+From: Maor Gottlieb <maorg@mellanox.com>
+Date: Mon, 16 Sep 2019 13:17:33 +0300
+Subject: net/mlx5e: Replace kfree with kvfree when free vhca stats
+Patch-mainline: v5.4-rc6
+Git-commit: 5dfb6335cbecbd59040275c8396c2d0af0bbd549
+References: jsc#SLE-8464
+
+Memory allocated by kvzalloc should be freed by kvfree.
+
+Fixes: cef35af34d6d ("net/mlx5e: Add mlx5e HV VHCA stats agent")
+Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
+@@ -141,7 +141,7 @@ int mlx5e_hv_vhca_stats_create(struct ml
+ "Failed to create hv vhca stats agent, err = %ld\n",
+ PTR_ERR(agent));
+
+- kfree(priv->stats_agent.buf);
++ kvfree(priv->stats_agent.buf);
+ return IS_ERR_OR_NULL(agent);
+ }
+
+@@ -157,5 +157,5 @@ void mlx5e_hv_vhca_stats_destroy(struct
+ return;
+
+ mlx5_hv_vhca_agent_destroy(priv->stats_agent.agent);
+- kfree(priv->stats_agent.buf);
++ kvfree(priv->stats_agent.buf);
+ }
diff --git a/series.conf b/series.conf
index a372488537..7b1e290170 100644
--- a/series.conf
+++ b/series.conf
@@ -2873,6 +2873,7 @@
patches.suse/net-rtnetlink-fix-a-typo-fbd-fdb.patch
patches.suse/net-mlx5e-Determine-source-port-properly-for-vlan-pu.patch
patches.suse/net-mlx5e-Remove-incorrect-match-criteria-assignment.patch
+ patches.suse/net-mlx5e-Replace-kfree-with-kvfree-when-free-vhca-s.patch
patches.suse/powerpc-powernv-Fix-CPU-idle-to-be-called-with-IRQs-.patch
patches.suse/scsi-qla2xxx-fixup-incorrect-usage-of-host_byte.patch
patches.suse/scsi-lpfc-Check-queue-pointer-before-use.patch