Re: [Qemu-devel] [PULL 47/58] qdev-monitor: Unref device when device_add fails

2013-11-19 Thread Amos Kong
On Mon, Nov 18, 2013 at 03:35:20PM +0100, Andreas Färber wrote: Am 18.11.2013 13:29, schrieb Amos Kong: On Tue, Oct 08, 2013 at 07:44:45PM +0200, Andreas Färber wrote: From: Stefan Hajnoczi stefa...@redhat.com qdev_device_add() leaks the created device upon failure. I suspect this

Re: [Qemu-devel] [PULL 47/58] qdev-monitor: Unref device when device_add fails

2013-11-19 Thread Paolo Bonzini
Il 19/11/2013 09:31, Amos Kong ha scritto: I can reproduce by hotplugging virtio-net-pci NIC for i in `seq 3 9` a b c d e f 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f;do for j in `seq 1 7` 0;do echo netdev_add tap,id=dev$i$j | nc -U /tmp/m echo device_add

Re: [Qemu-devel] [PULL 47/58] qdev-monitor: Unref device when device_add fails

2013-11-18 Thread Amos Kong
On Tue, Oct 08, 2013 at 07:44:45PM +0200, Andreas Färber wrote: From: Stefan Hajnoczi stefa...@redhat.com qdev_device_add() leaks the created device upon failure. I suspect this problem crept in because qdev_free() unparents the device but does not drop a reference - confusing name. Cc:

Re: [Qemu-devel] [PULL 47/58] qdev-monitor: Unref device when device_add fails

2013-11-18 Thread Andreas Färber
Am 18.11.2013 13:29, schrieb Amos Kong: On Tue, Oct 08, 2013 at 07:44:45PM +0200, Andreas Färber wrote: From: Stefan Hajnoczi stefa...@redhat.com qdev_device_add() leaks the created device upon failure. I suspect this problem crept in because qdev_free() unparents the device but does not