summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/openvswitch/flow_table.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index bd14052ed342..3c268b3d71c3 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -158,11 +158,13 @@ void ovs_flow_free(struct sw_flow *flow, bool deferred)
if (!flow)
return;
- ASSERT_OVSL();
-
if (flow->mask) {
struct sw_flow_mask *mask = flow->mask;
+ /* ovs-lock is required to protect mask-refcount and
+ * mask list.
+ */
+ ASSERT_OVSL();
BUG_ON(!mask->ref_count);
mask->ref_count--;