]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Feb 2022 15:57:06 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Feb 2022 15:57:06 +0000 (16:57 +0100)
added patches:
net-mlx5-fix-possible-deadlock-on-rule-deletion.patch
net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch

queue-5.4/net-mlx5-fix-possible-deadlock-on-rule-deletion.patch [new file with mode: 0644]
queue-5.4/net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/net-mlx5-fix-possible-deadlock-on-rule-deletion.patch b/queue-5.4/net-mlx5-fix-possible-deadlock-on-rule-deletion.patch
new file mode 100644 (file)
index 0000000..5003cf2
--- /dev/null
@@ -0,0 +1,32 @@
+From b645e57debca846f51b3209907546ea857ddd3f5 Mon Sep 17 00:00:00 2001
+From: Maor Gottlieb <maorg@nvidia.com>
+Date: Mon, 24 Jan 2022 21:25:04 +0200
+Subject: net/mlx5: Fix possible deadlock on rule deletion
+
+From: Maor Gottlieb <maorg@nvidia.com>
+
+commit b645e57debca846f51b3209907546ea857ddd3f5 upstream.
+
+Add missing call to up_write_ref_node() which releases the semaphore
+in case the FTE doesn't have destinations, such in drop rule case.
+
+Fixes: 465e7baab6d9 ("net/mlx5: Fix deletion of duplicate rules")
+Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
+Reviewed-by: Mark Bloch <mbloch@nvidia.com>
+Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/fs_core.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+@@ -1947,6 +1947,8 @@ void mlx5_del_flow_rules(struct mlx5_flo
+               fte->node.del_hw_func = NULL;
+               up_write_ref_node(&fte->node, false);
+               tree_put_node(&fte->node, false);
++      } else {
++              up_write_ref_node(&fte->node, false);
+       }
+       kfree(handle);
+ }
diff --git a/queue-5.4/net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch b/queue-5.4/net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch
new file mode 100644 (file)
index 0000000..cfb652a
--- /dev/null
@@ -0,0 +1,36 @@
+From 07666c75ad17d7389b18ac0235c8cf41e1504ea8 Mon Sep 17 00:00:00 2001
+From: Ariel Levkovich <lariel@nvidia.com>
+Date: Sat, 29 Jan 2022 01:39:24 +0200
+Subject: net/mlx5: Fix wrong limitation of metadata match on ecpf
+
+From: Ariel Levkovich <lariel@nvidia.com>
+
+commit 07666c75ad17d7389b18ac0235c8cf41e1504ea8 upstream.
+
+Match metadata support check returns false for ecpf device.
+However, this support does exist for ecpf and therefore this
+limitation should be removed to allow feature such as stacked
+devices and internal port offloaded to be supported.
+
+Fixes: 92ab1eb392c6 ("net/mlx5: E-Switch, Enable vport metadata matching if firmware supports it")
+Signed-off-by: Ariel Levkovich <lariel@nvidia.com>
+Reviewed-by: Maor Dickman <maord@nvidia.com>
+Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+@@ -1977,10 +1977,6 @@ esw_check_vport_match_metadata_supported
+       if (!MLX5_CAP_ESW_FLOWTABLE(esw->dev, flow_source))
+               return false;
+-      if (mlx5_core_is_ecpf_esw_manager(esw->dev) ||
+-          mlx5_ecpf_vport_exists(esw->dev))
+-              return false;
+-
+       return true;
+ }
index 19d38c32a882c4c77756903096bf188479a2b402..6ed50942cc29a5a61d6e469d5a9bf4693db07ee7 100644 (file)
@@ -24,3 +24,5 @@ net-ll_temac-check-the-return-value-of-devm_kmalloc.patch
 net-force-inlining-of-checksum-functions-in-net-checksum.h.patch
 nfp-flower-fix-a-potential-leak-in-nfp_tunnel_add_shared_mac.patch
 netfilter-nf_tables-fix-memory-leak-during-stateful-obj-update.patch
+net-mlx5-fix-possible-deadlock-on-rule-deletion.patch
+net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch