From: Fam Zheng <famz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Jason Wang <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio: Unregister memory listener when unrealize
Date: Wed, 10 May 2017 17:58:26 +0800 [thread overview]
Message-ID: <20170510095826.GB11394@lemon.lan> (raw)
In-Reply-To: <8760h96nva.fsf@dusky.pond.sub.org>
On Wed, 05/10 11:51, Markus Armbruster wrote:
> Fam Zheng <famz@redhat.com> writes:
>
> > Cc: qemu-stable@nongnu.org
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> > hw/virtio/virtio.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> > index 03592c5..a7741f4 100644
> > --- a/hw/virtio/virtio.c
> > +++ b/hw/virtio/virtio.c
> > @@ -2515,6 +2515,7 @@ static void virtio_device_unrealize(DeviceState *dev, Error **errp)
> > }
> > }
> >
> > + memory_listener_unregister(&vdev->listener);
> > g_free(vdev->bus_name);
> > vdev->bus_name = NULL;
> > }
>
> Is this a bug fix? If yes, what exactly's broken without it?
>
I thought it was obvious (missing unregister) but that was a mistake. There is
one in virtio_device_instance_finalize(), but the callback is just not called
due to something else with the QOM refcnt.
Will revise, and add commit message, of course.
Fam
prev parent reply other threads:[~2017-05-10 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-10 9:23 [Qemu-devel] [PATCH] virtio: Unregister memory listener when unrealize Fam Zheng
2017-05-10 9:36 ` [Qemu-devel] [Qemu-stable] " Fam Zheng
2017-05-10 9:51 ` [Qemu-devel] " Markus Armbruster
2017-05-10 9:58 ` Fam Zheng [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=20170510095826.GB11394@lemon.lan \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 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).