mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
parent
45fb9c35b2
commit
e4c6d75954
1 changed files with 4 additions and 2 deletions
|
@ -158,11 +158,13 @@ void ovs_flow_free(struct sw_flow *flow, bool deferred)
|
||||||
if (!flow)
|
if (!flow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ASSERT_OVSL();
|
|
||||||
|
|
||||||
if (flow->mask) {
|
if (flow->mask) {
|
||||||
struct sw_flow_mask *mask = 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);
|
BUG_ON(!mask->ref_count);
|
||||||
mask->ref_count--;
|
mask->ref_count--;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue