Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-09-02 Thread Gonglei (Arei)
qemu-devel@nongnu.org Developers; Huangpeng (Peter); Igor Mammedov; > Paolo Bonzini; Andreas Färber > Subject: Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in > device_set_realized() to avoid resource leak > Importance: High > > On Tue, Sep 2, 2014 at 12:13 PM, Gonglei (Ar

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-09-02 Thread Peter Crosthwaite
On Tue, Sep 2, 2014 at 12:13 PM, Gonglei (Arei) wrote: >> From: peter.crosthwa...@petalogix.com >> [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite >> Sent: Tuesday, September 02, 2014 6:51 AM >> >> On Mon, Sep 1, 2014 at 3:50 PM, wrote: >> >> > From: Gonglei >> >> > >> >

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-09-01 Thread Gonglei (Arei)
> From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Tuesday, September 02, 2014 6:51 AM > >> On Mon, Sep 1, 2014 at 3:50 PM, wrote: > >> > From: Gonglei > >> > > >> > At present, this function doesn't have partial cleanup impl

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-09-01 Thread Peter Crosthwaite
08 PM >> To: Gonglei (Arei) >> Cc: qemu-devel@nongnu.org Developers; Huangweidong (C); Michael S. Tsirkin; >> Luonengjun; Huangpeng (Peter); Igor Mammedov; Paolo Bonzini; Andreas >> Färber >> Subject: Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in >>

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread Gonglei (Arei)
Michael S. Tsirkin; > Luonengjun; Huangpeng (Peter); Igor Mammedov; Paolo Bonzini; Andreas > Färber > Subject: Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in > device_set_realized() to avoid resource leak > > On Mon, Sep 1, 2014 at 3:50 PM, wrote: > > From: Gonglei

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread Peter Crosthwaite
On Mon, Sep 1, 2014 at 3:50 PM, wrote: > From: Gonglei > > At present, this function doesn't have partial cleanup implemented, > which will cause resource leak in some scenarios. > > Example: > > 1. Assuming that "dc->realize(dev, &local_err)" execute successful >and local_err == NULL; > 2.

[Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread arei.gonglei
From: Gonglei At present, this function doesn't have partial cleanup implemented, which will cause resource leak in some scenarios. Example: 1. Assuming that "dc->realize(dev, &local_err)" execute successful and local_err == NULL; 2. Executing device hotplug in hotplug_handler_plug(), but fa