From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, david@redhat.com, borntraeger@de.ibm.com,
frankja@linux.ibm.com, pasic@linux.ibm.com, nrb@linux.ibm.com,
nsg@linux.ibm.com, seiden@linux.ibm.com
Subject: Re: [PATCH v2 2/2] s390x/pv: Add support for asynchronous teardown for reboot
Date: Tue, 17 Jan 2023 11:23:08 +0100 [thread overview]
Message-ID: <20230117112308.2daa9b4f@p-imbrenda> (raw)
In-Reply-To: <1ef3d781-e823-feb9-ce7d-f2f0c1456d9d@redhat.com>
On Tue, 17 Jan 2023 09:53:46 +0100
Thomas Huth <thuth@redhat.com> wrote:
[...]
> > +static void *s390_pv_do_unprot_async_fn(void *p)
> > +{
> > + s390_pv_cmd_exit(KVM_PV_ASYNC_CLEANUP_PERFORM, NULL);
> > + return NULL;
> > +}
> > +
> > +bool s390_pv_vm_try_disable_async(void)
> > +{
> > + QemuThread *t;
> > +
> > + if (!kvm_check_extension(kvm_state, KVM_CAP_S390_PROTECTED_ASYNC_DISABLE)) {
> > + return false;
> > + }
> > + if (s390_pv_cmd(KVM_PV_ASYNC_CLEANUP_PREPARE, NULL) != 0) {
> > + return false;
> > + }
> > +
> > + t = g_malloc0(sizeof(QemuThread));
>
> Sorry for not noticing it in v1 already ... but isn't this leaking memory?
> Who's supposed to free "t" again?
I assumed that QEMU_THREAD_DETACHED took care of that; it seems like I
was mistaken (oops).
I'll find a way to fix this
>
> Thomas
>
>
> > + qemu_thread_create(t, "async_cleanup", s390_pv_do_unprot_async_fn, NULL,
> > + QEMU_THREAD_DETACHED);
> > +
> > + return true;
> > +}
>
prev parent reply other threads:[~2023-01-17 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 15:50 [PATCH v2 0/2] s390x/pv: Add support for asynchronous teardown for reboot Claudio Imbrenda
2023-01-05 15:50 ` [PATCH v2 1/2] Linux header update Claudio Imbrenda
2023-01-05 15:50 ` [PATCH v2 2/2] s390x/pv: Add support for asynchronous teardown for reboot Claudio Imbrenda
2023-01-17 8:53 ` Thomas Huth
2023-01-17 10:23 ` Claudio Imbrenda [this message]
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=20230117112308.2daa9b4f@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=nrb@linux.ibm.com \
--cc=nsg@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=seiden@linux.ibm.com \
--cc=thuth@redhat.com \
/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 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).