qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio: Unregister memory listener when unreali


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] virtio: Unregister memory listener when unrealize
Date: Wed, 10 May 2017 17:58:26 +0800
User-agent: Mutt/1.8.0 (2017-02-23)

On Wed, 05/10 11:51, Markus Armbruster wrote:
> Fam Zheng <address@hidden> writes:
> 
> > Cc: address@hidden
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> >  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]