From: Greg Kroah-Hartman Date: Fri, 25 Feb 2022 15:57:06 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v4.9.304~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c12109d22856b740299e1414f50bf87808a41939;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: net-mlx5-fix-possible-deadlock-on-rule-deletion.patch net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch --- 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 index 00000000000..5003cf2932f --- /dev/null +++ b/queue-5.4/net-mlx5-fix-possible-deadlock-on-rule-deletion.patch @@ -0,0 +1,32 @@ +From b645e57debca846f51b3209907546ea857ddd3f5 Mon Sep 17 00:00:00 2001 +From: Maor Gottlieb +Date: Mon, 24 Jan 2022 21:25:04 +0200 +Subject: net/mlx5: Fix possible deadlock on rule deletion + +From: Maor Gottlieb + +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 +Reviewed-by: Mark Bloch +Signed-off-by: Saeed Mahameed +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..cfb652ae336 --- /dev/null +++ b/queue-5.4/net-mlx5-fix-wrong-limitation-of-metadata-match-on-ecpf.patch @@ -0,0 +1,36 @@ +From 07666c75ad17d7389b18ac0235c8cf41e1504ea8 Mon Sep 17 00:00:00 2001 +From: Ariel Levkovich +Date: Sat, 29 Jan 2022 01:39:24 +0200 +Subject: net/mlx5: Fix wrong limitation of metadata match on ecpf + +From: Ariel Levkovich + +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 +Reviewed-by: Maor Dickman +Signed-off-by: Saeed Mahameed +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } + diff --git a/queue-5.4/series b/queue-5.4/series index 19d38c32a88..6ed50942cc2 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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