aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErez Shitrit <erezsh@mellanox.com>2019-11-25 10:26:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-12 12:21:51 +0100
commitedac9ecdf48da11fbc9ba944a1e9a7d5987e9c35 (patch)
treebba9eecd76050b5cf002c10847e285a79ddbcba8
parentcaef8a716245726ede87417113db03f045fc1989 (diff)
downloadlinux-yocto-edac9ecdf48da11fbc9ba944a1e9a7d5987e9c35.tar.gz
linux-yocto-edac9ecdf48da11fbc9ba944a1e9a7d5987e9c35.tar.bz2
linux-yocto-edac9ecdf48da11fbc9ba944a1e9a7d5987e9c35.zip
net/mlx5: DR, Init lists that are used in rule's member
[ Upstream commit df55c5586e5185f890192a6802dc5b46fddd3606 ] Whenever adding new member of rule object we attach it to 2 lists, These 2 lists should be initialized first. Fixes: 41d07074154c ("net/mlx5: DR, Expose steering rule functionality") Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
index 6d186e2d3e74..e1a647dde978 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
@@ -638,6 +638,9 @@ static int dr_rule_add_member(struct mlx5dr_rule_rx_tx *nic_rule,
if (!rule_mem)
return -ENOMEM;
+ INIT_LIST_HEAD(&rule_mem->list);
+ INIT_LIST_HEAD(&rule_mem->use_ste_list);
+
rule_mem->ste = ste;
list_add_tail(&rule_mem->list, &nic_rule->rule_members_list);