summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHong Zhiguo <honkiko@gmail.com>2013-03-27 20:41:17 +0800
committerJesse Gross <jesse@nicira.com>2013-03-27 09:07:41 -0700
commitd3e1101c9b75574e68380b5cb10c9395fd8855de (patch)
treee2de13a7c6802b9feb80ebf53854e76dac26172d /net
parenta9341512c372fcc628dabc619898d910a06c54bc (diff)
downloadop-kernel-dev-d3e1101c9b75574e68380b5cb10c9395fd8855de.zip
op-kernel-dev-d3e1101c9b75574e68380b5cb10c9395fd8855de.tar.gz
openvswitch: correct an invalid BUG_ON
table->count is uint32_t Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net')
-rw-r--r--net/openvswitch/flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index fe0e421..67a2b78 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -795,9 +795,9 @@ void ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow)
void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow)
{
+ BUG_ON(table->count == 0);
hlist_del_rcu(&flow->hash_node[table->node_ver]);
table->count--;
- BUG_ON(table->count < 0);
}
/* The size of the argument for each %OVS_KEY_ATTR_* Netlink attribute. */
OpenPOWER on IntegriCloud