Hi, The following series fixes the usb-ccid hotplug regression introduced by commit 675f22c6d3b0: the plugged device is not completely removed on device_del anymore, due to an extra reference added when doing set_link(). It turns out the memory management of qdev bus/child is a bit weird, this is my attempt to improve the situation and fix the regression.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1556678 Marc-André Lureau (4): bus: do not unref the added child bus on realize object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence usb-ccid: fix bus leak usb-hcd-xhci-test: add a test for ccid hotplug include/qom/object.h | 12 +++++++++--- hw/core/bus.c | 1 - hw/core/qdev-properties.c | 2 +- hw/core/qdev.c | 2 +- hw/display/xlnx_dp.c | 2 +- hw/dma/xilinx_axidma.c | 4 ++-- hw/dma/xlnx-zdma.c | 2 +- hw/i386/pc.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/ipmi/ipmi.c | 2 +- hw/net/xilinx_axienet.c | 4 ++-- hw/ssi/xilinx_spips.c | 2 +- hw/usb/dev-smartcard-reader.c | 1 + net/can/can_host.c | 2 +- net/colo-compare.c | 2 +- qom/object.c | 8 +++++--- target/arm/cpu.c | 4 ++-- tests/usb-hcd-xhci-test.c | 10 ++++++++++ ui/console.c | 2 +- 20 files changed, 43 insertions(+), 25 deletions(-) base-commit: c181ddaa176856b3cd2dfd12bbcf25fa9c884a97 -- 2.17.1.906.g10fd178552