[Qemu-devel] [PATCH for-2.9] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Fam Zheng
For one thing we shouldn't continue if an error happened, for the other two steps failing can cause an abort() in error_setg because we reuse the same errp blindly. Add error handling checks to fix both issues. Signed-off-by: Fam Zheng --- hw/virtio/virtio-bus.c | 18 -- 1 file

Re: [Qemu-devel] [PATCH for-2.9] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Cornelia Huck
On Fri, 17 Mar 2017 19:33:53 +0800 Fam Zheng wrote: > For one thing we shouldn't continue if an error happened, for the other > two steps failing can cause an abort() in error_setg because we reuse > the same errp blindly. > > Add error handling checks to fix both issues. > > Signed-off-by: Fam

Re: [Qemu-devel] [PATCH for-2.9] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Andrew Jones
On Fri, Mar 17, 2017 at 07:33:53PM +0800, Fam Zheng wrote: > For one thing we shouldn't continue if an error happened, for the other > two steps failing can cause an abort() in error_setg because we reuse > the same errp blindly. > > Add error handling checks to fix both issues. > > Signed-off-by

Re: [Qemu-devel] [PATCH for-2.9] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Cornelia Huck
On Fri, 17 Mar 2017 13:18:16 +0100 Andrew Jones wrote: > On Fri, Mar 17, 2017 at 07:33:53PM +0800, Fam Zheng wrote: > > For one thing we shouldn't continue if an error happened, for the other > > two steps failing can cause an abort() in error_setg because we reuse > > the same errp blindly. > >

Re: [Qemu-devel] [PATCH for-2.9] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Fam Zheng
On Fri, 03/17 13:18, Andrew Jones wrote: > On Fri, Mar 17, 2017 at 07:33:53PM +0800, Fam Zheng wrote: > > For one thing we shouldn't continue if an error happened, for the other > > two steps failing can cause an abort() in error_setg because we reuse > > the same errp blindly. > > > > Add error h