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

2019-08-27 Thread Johannes Berg
Hi, > What other problems? Sure we need the caller to unref. Don't recall, and now I can't reproduce it, sorry. > > > Imho, we should change the behaviour of the function to return a ref > > > source. > > > > Which "the function" do you mean? > > The vug_source_new() function. [...] > Sure we

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

2019-08-27 Thread Marc-André Lureau
Hi On Tue, Aug 27, 2019 at 3:37 PM Johannes Berg wrote: > > On Tue, 2019-08-27 at 14:47 +0400, Marc-André Lureau wrote: > > Hi > > > > On Tue, Aug 27, 2019 at 12:32 PM Johannes Berg > > wrote: > > > From: Johannes Berg > > > > > > If you try to make a device implementation that can handle multi

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

2019-08-27 Thread Johannes Berg
On Tue, 2019-08-27 at 14:47 +0400, Marc-André Lureau wrote: > Hi > > On Tue, Aug 27, 2019 at 12:32 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 th

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

2019-08-27 Thread Marc-André Lureau
Hi On Tue, Aug 27, 2019 at 12:32 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 > w

[Qemu-devel] [PATCH] 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