netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] openvswitch: correct an invalid BUG_ON
@ 2013-03-27 12:41 Hong Zhiguo
       [not found] ` <1364388077-30480-1-git-send-email-honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Hong Zhiguo @ 2013-03-27 12:41 UTC (permalink / raw)
  To: netdev; +Cc: dev, davem, stephen, jesse

table->count is uint32_t

Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
 net/openvswitch/flow.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.  */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] openvswitch: correct an invalid BUG_ON
       [not found] ` <1364388077-30480-1-git-send-email-honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-03-27 15:19   ` Jesse Gross
  2013-03-27 16:58     ` Hong zhi guo
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Gross @ 2013-03-27 15:19 UTC (permalink / raw)
  To: Hong Zhiguo
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Wed, Mar 27, 2013 at 5:41 AM, Hong Zhiguo <honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> table->count is uint32_t
>
> Signed-off-by: Hong Zhiguo <honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] openvswitch: correct an invalid BUG_ON
  2013-03-27 15:19   ` Jesse Gross
@ 2013-03-27 16:58     ` Hong zhi guo
  0 siblings, 0 replies; 3+ messages in thread
From: Hong zhi guo @ 2013-03-27 16:58 UTC (permalink / raw)
  To: Jesse Gross; +Cc: netdev

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

On Wed, Mar 27, 2013 at 11:19 PM, Jesse Gross <jesse@nicira.com> wrote:
> On Wed, Mar 27, 2013 at 5:41 AM, Hong Zhiguo <honkiko@gmail.com> wrote:
>> table->count is uint32_t
>>
>> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
>
> Applied, thanks.



-- 
best regards
Hong Zhiguo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-27 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 12:41 [PATCH net-next] openvswitch: correct an invalid BUG_ON Hong Zhiguo
     [not found] ` <1364388077-30480-1-git-send-email-honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-27 15:19   ` Jesse Gross
2013-03-27 16:58     ` Hong zhi guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).