aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/openvswitch/datapath.c3
-rw-r--r--net/openvswitch/datapath.h2
-rw-r--r--net/openvswitch/flow_table.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index fcaed98b2c0d..0727aaa2c825 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -701,8 +701,7 @@ static int ovs_flow_cmd_fill_info(struct sw_flow *flow, struct datapath *dp,
701 if (start) { 701 if (start) {
702 const struct sw_flow_actions *sf_acts; 702 const struct sw_flow_actions *sf_acts;
703 703
704 sf_acts = rcu_dereference_check(flow->sf_acts, 704 sf_acts = rcu_dereference_ovsl(flow->sf_acts);
705 lockdep_ovsl_is_held());
706 705
707 err = ovs_nla_put_actions(sf_acts->actions, 706 err = ovs_nla_put_actions(sf_acts->actions,
708 sf_acts->actions_len, skb); 707 sf_acts->actions_len, skb);
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 4067ea41be28..ba13be4a680f 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -145,6 +145,8 @@ int lockdep_ovsl_is_held(void);
145#define ASSERT_OVSL() WARN_ON(unlikely(!lockdep_ovsl_is_held())) 145#define ASSERT_OVSL() WARN_ON(unlikely(!lockdep_ovsl_is_held()))
146#define ovsl_dereference(p) \ 146#define ovsl_dereference(p) \
147 rcu_dereference_protected(p, lockdep_ovsl_is_held()) 147 rcu_dereference_protected(p, lockdep_ovsl_is_held())
148#define rcu_dereference_ovsl(p) \
149 rcu_dereference_check(p, lockdep_ovsl_is_held())
148 150
149static inline struct net *ovs_dp_get_net(struct datapath *dp) 151static inline struct net *ovs_dp_get_net(struct datapath *dp)
150{ 152{
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index 261a54e77503..7b9cf2c43813 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -433,7 +433,7 @@ struct sw_flow *ovs_flow_tbl_lookup_stats(struct flow_table *tbl,
433 const struct sw_flow_key *key, 433 const struct sw_flow_key *key,
434 u32 *n_mask_hit) 434 u32 *n_mask_hit)
435{ 435{
436 struct table_instance *ti = rcu_dereference(tbl->ti); 436 struct table_instance *ti = rcu_dereference_ovsl(tbl->ti);
437 struct sw_flow_mask *mask; 437 struct sw_flow_mask *mask;
438 struct sw_flow *flow; 438 struct sw_flow *flow;
439 439