diff options
author | David S. Miller <davem@davemloft.net> | 2019-08-06 17:15:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-06 17:15:39 -0400 |
commit | 443bfb4acb83a6f0b7d9b11ac32f17c67f14e995 (patch) | |
tree | a070b8dedee983ee82415fe636b0ca7d435c4d77 | |
parent | 2b0dfc1753332d81d8e6654d682d8740aed4dec9 (diff) | |
parent | 67cbf7dedd03a63ca2fbd9df2049eabba7a37edf (diff) |
Merge branch 'flow_offload-action-fixes'
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>
-rw-r--r-- | include/net/tc_act/tc_police.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_sample.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/tc_act/tc_police.h b/include/net/tc_act/tc_police.h index 8b9ef3664262..cfdc7cb82cad 100644 --- a/include/net/tc_act/tc_police.h +++ b/include/net/tc_act/tc_police.h | |||
@@ -54,7 +54,7 @@ static inline u64 tcf_police_rate_bytes_ps(const struct tc_action *act) | |||
54 | struct tcf_police *police = to_police(act); | 54 | struct tcf_police *police = to_police(act); |
55 | struct tcf_police_params *params; | 55 | struct tcf_police_params *params; |
56 | 56 | ||
57 | params = rcu_dereference_bh(police->params); | 57 | params = rcu_dereference_bh_rtnl(police->params); |
58 | return params->rate.rate_bytes_ps; | 58 | return params->rate.rate_bytes_ps; |
59 | } | 59 | } |
60 | 60 | ||
@@ -63,7 +63,7 @@ static inline s64 tcf_police_tcfp_burst(const struct tc_action *act) | |||
63 | struct tcf_police *police = to_police(act); | 63 | struct tcf_police *police = to_police(act); |
64 | struct tcf_police_params *params; | 64 | struct tcf_police_params *params; |
65 | 65 | ||
66 | params = rcu_dereference_bh(police->params); | 66 | params = rcu_dereference_bh_rtnl(police->params); |
67 | return params->tcfp_burst; | 67 | return params->tcfp_burst; |
68 | } | 68 | } |
69 | 69 | ||
diff --git a/include/net/tc_act/tc_sample.h b/include/net/tc_act/tc_sample.h index 0a559d4b6f0f..b4fce0fae645 100644 --- a/include/net/tc_act/tc_sample.h +++ b/include/net/tc_act/tc_sample.h | |||
@@ -44,7 +44,7 @@ static inline int tcf_sample_trunc_size(const struct tc_action *a) | |||
44 | static inline struct psample_group * | 44 | static inline struct psample_group * |
45 | tcf_sample_psample_group(const struct tc_action *a) | 45 | tcf_sample_psample_group(const struct tc_action *a) |
46 | { | 46 | { |
47 | return rcu_dereference(to_sample(a)->psample_group); | 47 | return rcu_dereference_rtnl(to_sample(a)->psample_group); |
48 | } | 48 | } |
49 | 49 | ||
50 | #endif /* __NET_TC_SAMPLE_H */ | 50 | #endif /* __NET_TC_SAMPLE_H */ |