From: Pravin <pshe...@nicira.com>

ovs_flow_free() is not called under ovs-lock during packet
execute path. Since packet execute does not touch flow->mask,
there is no need to take that lock either. So move assert in
case where flow->mask is checked.

Found by code inspection.

Signed-off-by: Pravin B Shelar <pshe...@nicira.com>
---
 datapath/flow_table.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/datapath/flow_table.c b/datapath/flow_table.c
index c0ba8ef..74d2afd 100644
--- a/datapath/flow_table.c
+++ b/datapath/flow_table.c
@@ -169,11 +169,10 @@ 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;
 
+               ASSERT_OVSL();
                BUG_ON(!mask->ref_count);
                mask->ref_count--;
 
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to