提交 e4c6d759 编写于 作者: P Pravin B Shelar 提交者: Jesse Gross

openvswitch: Fix ovs_flow_free() ovs-lock assert.

ovs_flow_free() is not called under ovs-lock during packet
execute path (ovs_packet_cmd_execute()). 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: NPravin B Shelar <pshelar@nicira.com>
Signed-off-by: NJesse Gross <jesse@nicira.com>
上级 45fb9c35
......@@ -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--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册