@@ -91,7 +91,7 @@ static int tcf_csum_init(struct net *net, struct nlattr *nla,
91
91
}
92
92
params_old = rtnl_dereference (p -> params );
93
93
94
- params_new -> action = parm -> action ;
94
+ p -> tcf_action = parm -> action ;
95
95
params_new -> update_flags = parm -> update_flags ;
96
96
rcu_assign_pointer (p -> params , params_new );
97
97
if (params_old )
@@ -561,7 +561,7 @@ static int tcf_csum(struct sk_buff *skb, const struct tc_action *a,
561
561
tcf_lastuse_update (& p -> tcf_tm );
562
562
bstats_cpu_update (this_cpu_ptr (p -> common .cpu_bstats ), skb );
563
563
564
- action = params -> action ;
564
+ action = READ_ONCE ( p -> tcf_action ) ;
565
565
if (unlikely (action == TC_ACT_SHOT ))
566
566
goto drop_stats ;
567
567
@@ -599,11 +599,11 @@ static int tcf_csum_dump(struct sk_buff *skb, struct tc_action *a, int bind,
599
599
.index = p -> tcf_index ,
600
600
.refcnt = p -> tcf_refcnt - ref ,
601
601
.bindcnt = p -> tcf_bindcnt - bind ,
602
+ .action = p -> tcf_action ,
602
603
};
603
604
struct tcf_t t ;
604
605
605
606
params = rtnl_dereference (p -> params );
606
- opt .action = params -> action ;
607
607
opt .update_flags = params -> update_flags ;
608
608
609
609
if (nla_put (skb , TCA_CSUM_PARMS , sizeof (opt ), & opt ))
0 commit comments