|
From: | Hailiang Zhang |
Subject: | Re: [Qemu-devel] [PATCH 2/3] colo-compare: Check main_loop value before call g_main_loop_quit |
Date: | Mon, 24 Apr 2017 14:06:37 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 2017/4/24 12:13, Jason Wang wrote:
On 2017年04月20日 15:46, zhanghailiang wrote:If some errors happen before main_loop is initialized in colo compare thread, qemu will go into finalizing process where we call g_main_loop_quit(s->main_loop), if main_loop is NULL, there will be an error report: "(process:14861): GLib-CRITICAL **: g_main_loop_quit: assertion 'loop != NULL' failed". We need to check if main_loop is NULL or not before call g_main_loop_quit().Do we need check and fail early in colo_compare_thread() too?
Yes, we need to check there too, will add the check in next version, thanks.
ThanksSigned-off-by: zhanghailiang <address@hidden> --- net/colo-compare.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index a6bf419..d6a5e4c 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -770,7 +770,9 @@ static void colo_compare_finalize(Object *obj) s->worker_context, true); qemu_chr_fe_deinit(&s->chr_out);- g_main_loop_quit(s->compare_loop);+ if (s->compare_loop) { + g_main_loop_quit(s->compare_loop); + } qemu_thread_join(&s->thread);/* Release all unhandled packets after compare thead exited */.
[Prev in Thread] | Current Thread | [Next in Thread] |