Re: [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-28 Thread Johannes Berg
Hi, > > +g_source_unref(src); > > +g_source_destroy(src); > > I would call destroy() (detach) before unref(). Fair enough. I think there's an internal reference, but it's probably safer that way. > > +vugg_source_destroy(vi.evsrc); > > typo Oops. I thought I compiled it, I guess I

Re: [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Marc-André Lureau
Hi On Tue, Aug 27, 2019 at 4:49 PM Johannes Berg wrote: > > From: Johannes Berg > > If you try to make a device implementation that can handle multiple > connections and allow disconnections (which requires overriding the > VHOST_USER_NONE handling), then glib will warn that we remove a src > wh

[Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Johannes Berg
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't exis