Re: [Xen-devel] [PATCH v2] xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()

2017-02-02 Thread Stefano Stabellini
On Thu, 2 Feb 2017, Juergen Gross wrote: > On 01/02/17 21:20, Peter Maydell wrote: > > On 1 February 2017 at 19:37, Stefano Stabellini > > wrote: > >> Hi Peter, > >> > >> do you think this is acceptable? > > > > The set of operations here is basically what I suggested >

Re: [Xen-devel] [PATCH v2] xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()

2017-02-02 Thread Juergen Gross
On 01/02/17 21:20, Peter Maydell wrote: > On 1 February 2017 at 19:37, Stefano Stabellini > wrote: >> Hi Peter, >> >> do you think this is acceptable? > > The set of operations here is basically what I suggested > in review of v1, so I think it is the right thing. > OTOH

Re: [Xen-devel] [PATCH v2] xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()

2017-02-01 Thread Peter Maydell
On 1 February 2017 at 19:37, Stefano Stabellini wrote: > Hi Peter, > > do you think this is acceptable? The set of operations here is basically what I suggested in review of v1, so I think it is the right thing. OTOH this is a bit of an odd corner of the QOM model so it

Re: [Xen-devel] [PATCH v2] xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()

2017-02-01 Thread Stefano Stabellini
Hi Peter, do you think this is acceptable? Thanks, Stefano On Wed, 1 Feb 2017, Juergen Gross wrote: > The error exits of xen_pv_find_xendev() free the new xen-device via > g_free() which is wrong. > > As the xen-device has been initialized as qdev it must be removed > via qdev_unplug(). > >

[Xen-devel] [PATCH v2] xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()

2017-01-31 Thread Juergen Gross
The error exits of xen_pv_find_xendev() free the new xen-device via g_free() which is wrong. As the xen-device has been initialized as qdev it must be removed via qdev_unplug(). This bug has been introduced with commit 3a6c9172ac5951e6dac2b3f6 ("xen: create qdev for each backend device").