aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team_mode_loadbalance.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index a58dfebb5512..7106f3456439 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -293,11 +293,15 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
293 __fprog_destroy(lb_priv->ex->orig_fprog); 293 __fprog_destroy(lb_priv->ex->orig_fprog);
294 orig_fp = rcu_dereference_protected(lb_priv->fp, 294 orig_fp = rcu_dereference_protected(lb_priv->fp,
295 lockdep_is_held(&team->lock)); 295 lockdep_is_held(&team->lock));
296 sk_unattached_filter_destroy(orig_fp);
297 } 296 }
298 297
299 rcu_assign_pointer(lb_priv->fp, fp); 298 rcu_assign_pointer(lb_priv->fp, fp);
300 lb_priv->ex->orig_fprog = fprog; 299 lb_priv->ex->orig_fprog = fprog;
300
301 if (orig_fp) {
302 synchronize_rcu();
303 sk_unattached_filter_destroy(orig_fp);
304 }
301 return 0; 305 return 0;
302} 306}
303 307