[ovs-dev] [PATCH] datapath: Fix ovs_flow_free() ovs-lock assert.
pshelar at nicira.com
pshelar at nicira.com
Wed Jan 29 17:20:27 UTC 2014
From: Pravin <pshelar at 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 <pshelar at 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
More information about the dev
mailing list