@@ -358,6 +358,7 @@ static void arfs_may_expire_flow(struct mlx5e_priv *priv)
int j;
HLIST_HEAD(del_list);
+
spin_lock_bh(&priv->fs.arfs.arfs_lock);
mlx5e_for_each_arfs_rule(arfs_rule, htmp, priv->fs.arfs.arfs_tables, i, j) {
if (!work_pending(&arfs_rule->arfs_work) &&
@@ -387,6 +388,7 @@ static void arfs_del_rules(struct mlx5e_priv *priv)
int j;
HLIST_HEAD(del_list);
+
spin_lock_bh(&priv->fs.arfs.arfs_lock);
mlx5e_for_each_arfs_rule(rule, htmp, priv->fs.arfs.arfs_tables, i, j) {
hlist_del_init(&rule->hlist);
@@ -1085,6 +1085,7 @@ static int fpga_ipsec_fs_create_fte(struct mlx5_flow_root_namespace *ns,
rule->ctx = mlx5_fpga_ipsec_fs_create_sa_ctx(dev, fte, is_egress);
if (IS_ERR(rule->ctx)) {
int err = PTR_ERR(rule->ctx);
+
kfree(rule);
return err;
}