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:48 +0100
commit5a3b1528d3e04fc4addda7515ecf2011381bc30b (patch)
treec9db9a0fbad33ac9d827493a6992e7fc82348456
parent8433dcc1940a8c36ee1363c2079960f3d3923432 (diff)
net/mlx5: Fix rtable reference leak (jsc#SLE-8464).
-rw-r--r--patches.suse/net-mlx5-Fix-rtable-reference-leak.patch56
-rw-r--r--series.conf1
2 files changed, 57 insertions, 0 deletions
diff --git a/patches.suse/net-mlx5-Fix-rtable-reference-leak.patch b/patches.suse/net-mlx5-Fix-rtable-reference-leak.patch
new file mode 100644
index 0000000000..c50f2c10ef
--- /dev/null
+++ b/patches.suse/net-mlx5-Fix-rtable-reference-leak.patch
@@ -0,0 +1,56 @@
+From: Parav Pandit <parav@mellanox.com>
+Date: Thu, 19 Sep 2019 15:58:14 -0500
+Subject: net/mlx5: Fix rtable reference leak
+Patch-mainline: v5.4-rc6
+Git-commit: 2347cee83b2bd868bde2d283db0fac89f22be4e0
+References: jsc#SLE-8464
+
+If the rt entry gateway family is not AF_INET for multipath device,
+rtable reference is leaked.
+Hence, fix it by releasing the reference.
+
+Fixes: 5fb091e8130b ("net/mlx5e: Use hint to resolve route when in HW multipath mode")
+Fixes: e32ee6c78efa ("net/mlx5e: Support tunnel encap over tagged Ethernet")
+Signed-off-by: Parav Pandit <parav@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
+@@ -97,15 +97,19 @@ static int mlx5e_route_lookup_ipv4(struc
+ if (ret)
+ return ret;
+
+- if (mlx5_lag_is_multipath(mdev) && rt->rt_gw_family != AF_INET)
++ if (mlx5_lag_is_multipath(mdev) && rt->rt_gw_family != AF_INET) {
++ ip_rt_put(rt);
+ return -ENETUNREACH;
++ }
+ #else
+ return -EOPNOTSUPP;
+ #endif
+
+ ret = get_route_and_out_devs(priv, rt->dst.dev, route_dev, out_dev);
+- if (ret < 0)
++ if (ret < 0) {
++ ip_rt_put(rt);
+ return ret;
++ }
+
+ if (!(*out_ttl))
+ *out_ttl = ip4_dst_hoplimit(&rt->dst);
+@@ -149,8 +153,10 @@ static int mlx5e_route_lookup_ipv6(struc
+ *out_ttl = ip6_dst_hoplimit(dst);
+
+ ret = get_route_and_out_devs(priv, dst->dev, route_dev, out_dev);
+- if (ret < 0)
++ if (ret < 0) {
++ dst_release(dst);
+ return ret;
++ }
+ #else
+ return -EOPNOTSUPP;
+ #endif
diff --git a/series.conf b/series.conf
index 5d86a47106..68e0e6f0a8 100644
--- a/series.conf
+++ b/series.conf
@@ -2875,6 +2875,7 @@
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/net-mlx5e-Only-skip-encap-flows-update-when-encap-in.patch
+ patches.suse/net-mlx5-Fix-rtable-reference-leak.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