Skip to contentSkip to conversation

openvswitch: correct an invalid BUG_ON

PATCH Applied Hong Zhiguo 2 participants 3 messages Mar 27, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openvswitch: correct an invalid BUG_ON

table->count is uint32_t

---
 net/openvswitch/flow.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/openvswitch/flow.c +1 -1
index fe0e421..67a2b78 100644
@@ -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.  */
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 1364388077-30480-1-git-send-email-honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#3 lore raw

Thanks for your review comments. I re-patched according to your comments. Please help to review it. Thanks.

Quoted 6 lines · Jesse Gross
Quoted 3 lines · Hong Zhiguo

table->count is uint32_t

Applied, thanks.

Signature · 2 lines
best regards
Hong Zhiguo