Skip to content

Commit

Permalink
Merge branch 'flow_offload-action-fixes'
Browse files Browse the repository at this point in the history
Vlad Buslov says:

====================
action fixes for flow_offload infra compatibility

Fix rcu warnings due to usage of action helpers that expect rcu read lock
protection from rtnl-protected context of flow_offload infra.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 6, 2019
2 parents 2b0dfc1 + 67cbf7d commit 443bfb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/net/tc_act/tc_police.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static inline u64 tcf_police_rate_bytes_ps(const struct tc_action *act)
struct tcf_police *police = to_police(act);
struct tcf_police_params *params;

params = rcu_dereference_bh(police->params);
params = rcu_dereference_bh_rtnl(police->params);
return params->rate.rate_bytes_ps;
}

Expand All @@ -63,7 +63,7 @@ static inline s64 tcf_police_tcfp_burst(const struct tc_action *act)
struct tcf_police *police = to_police(act);
struct tcf_police_params *params;

params = rcu_dereference_bh(police->params);
params = rcu_dereference_bh_rtnl(police->params);
return params->tcfp_burst;
}

Expand Down
2 changes: 1 addition & 1 deletion include/net/tc_act/tc_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static inline int tcf_sample_trunc_size(const struct tc_action *a)
static inline struct psample_group *
tcf_sample_psample_group(const struct tc_action *a)
{
return rcu_dereference(to_sample(a)->psample_group);
return rcu_dereference_rtnl(to_sample(a)->psample_group);
}

#endif /* __NET_TC_SAMPLE_H */

0 comments on commit 443bfb4

Please sign in to comment.