All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Chen <chen.zhang@intel.com>
To: Jason Wang <jasowang@redhat.com>, Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: Zhang Chen <chen.zhang@intel.com>,
	qemu-dev <qemu-devel@nongnu.org>,
	Li Zhijian <lizhijian@fujitsu.com>
Subject: [PATCH V2 3/4] net/colo.c: No need to track conn_list for filter-rewriter
Date: Fri,  1 Apr 2022 11:47:01 +0800	[thread overview]
Message-ID: <20220401034702.687057-4-chen.zhang@intel.com> (raw)
In-Reply-To: <20220401034702.687057-1-chen.zhang@intel.com>

Filter-rewriter no need to track connection in conn_list.
This patch fix the glib g_queue_is_empty assertion when COLO guest
keep a lot of network connection.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
---
 net/colo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/colo.c b/net/colo.c
index 1f8162f59f..694f3c93ef 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -218,7 +218,7 @@ Connection *connection_get(GHashTable *connection_track_table,
             /*
              * clear the conn_list
              */
-            while (!g_queue_is_empty(conn_list)) {
+            while (conn_list && !g_queue_is_empty(conn_list)) {
                 connection_destroy(g_queue_pop_head(conn_list));
             }
         }
-- 
2.25.1



  parent reply	other threads:[~2022-04-01  4:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01  3:46 [PATCH V2 0/4] COLO net and runstate bugfix/optimization Zhang Chen
2022-04-01  3:46 ` [PATCH V2 1/4] softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH Zhang Chen
2022-04-27  8:56   ` Jason Wang
2022-04-27  9:26     ` Zhang, Chen
2022-05-07  2:03       ` Zhang, Chen
2022-05-07  5:08         ` Jason Wang
2022-05-18 13:08           ` Dr. David Alan Gilbert
2022-05-19  2:18             ` Jason Wang
2022-07-06  5:02               ` Zhang, Chen
2022-07-06  5:39                 ` Jason Wang
2022-04-01  3:47 ` [PATCH V2 2/4] net/colo: Fix a "double free" crash to clear the conn_list Zhang Chen
2022-04-01  3:47 ` Zhang Chen [this message]
2022-04-01  3:47 ` [PATCH V2 4/4] net/colo.c: fix segmentation fault when packet is not parsed correctly Zhang Chen
2022-04-14  1:52 ` [PATCH V2 0/4] COLO net and runstate bugfix/optimization Zhang, Chen
2022-04-14  3:12   ` Jason Wang
2022-04-14  3:24     ` Zhang, Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220401034702.687057-4-chen.zhang@intel.com \
    --to=chen.zhang@intel.com \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=lizhijian@fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.