From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/3] main-loop: Fix GSource leak in qio_task_thread_worker()
Date: Fri, 22 Feb 2019 12:08:46 +0000 [thread overview]
Message-ID: <20190222120846.GN25234@redhat.com> (raw)
In-Reply-To: <0df0773f716140fec012d6778220b8a07067a5c6.1550836631.git.berto@igalia.com>
In $SUBJECT s/main-loop/io/
On Fri, Feb 22, 2019 at 01:59:10PM +0200, Alberto Garcia wrote:
> After g_source_attach() the GMainContext holds a reference to the
> GSource, so the caller does not need to keep it.
>
> qio_task_thread_worker() is not releasing its reference so the GSource
> is being leaked since a17536c594bfed94d05667b419f747b692f5fc7f.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> io/task.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/io/task.c b/io/task.c
> index 64c4c7126a..1ae7b86488 100644
> --- a/io/task.c
> +++ b/io/task.c
> @@ -136,6 +136,7 @@ static gpointer qio_task_thread_worker(gpointer opaque)
> qio_task_thread_result, task, NULL);
> g_source_attach(task->thread->completion,
> task->thread->context);
> + g_source_unref(task->thread->completion);
> trace_qio_task_thread_source_attach(task, task->thread->completion);
>
> qemu_cond_signal(&task->thread_cond);
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-02-22 12:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 11:59 [Qemu-devel] [PATCH v2 0/3] char-socket: Fix race condition Alberto Garcia
2019-02-22 11:59 ` [Qemu-devel] [PATCH v2 1/3] main-loop: Fix GSource leak in qio_task_thread_worker() Alberto Garcia
2019-02-22 12:08 ` Daniel P. Berrangé [this message]
2019-02-22 11:59 ` [Qemu-devel] [PATCH v2 2/3] main-loop: Add qemu_idle_add() Alberto Garcia
2019-02-22 12:10 ` Daniel P. Berrangé
2019-02-22 11:59 ` [Qemu-devel] [PATCH v2 3/3] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout() Alberto Garcia
2019-02-22 12:16 ` Daniel P. Berrangé
2019-02-22 12:32 ` Alberto Garcia
2019-02-22 12:36 ` [Qemu-devel] [PATCH v2 0/3] char-socket: Fix race condition Paolo Bonzini
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=20190222120846.GN25234@redhat.com \
--to=berrange@redhat.com \
--cc=berto@igalia.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.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.