qemu-patch-raspberry4/hw
Pan Nengyuan 13e5468127 vhost-user-blk: delete virtioqueues in unrealize to fix memleaks
virtio queues forgot to delete in unrealize, and aslo error path in
realize, this patch fix these memleaks, the leak stack is as follow:

Direct leak of 114688 byte(s) in 16 object(s) allocated from:
    #0 0x7f24024fdbf0 in calloc (/lib64/libasan.so.3+0xcabf0)
    #1 0x7f2401642015 in g_malloc0 (/lib64/libglib-2.0.so.0+0x50015)
    #2 0x55ad175a6447 in virtio_add_queue /mnt/sdb/qemu/hw/virtio/virtio.c:2327
    #3 0x55ad17570cf9 in vhost_user_blk_device_realize /mnt/sdb/qemu/hw/block/vhost-user-blk.c:419
    #4 0x55ad175a3707 in virtio_device_realize /mnt/sdb/qemu/hw/virtio/virtio.c:3509
    #5 0x55ad176ad0d1 in device_set_realized /mnt/sdb/qemu/hw/core/qdev.c:876
    #6 0x55ad1781ff9d in property_set_bool /mnt/sdb/qemu/qom/object.c:2080
    #7 0x55ad178245ae in object_property_set_qobject /mnt/sdb/qemu/qom/qom-qobject.c:26
    #8 0x55ad17821eb4 in object_property_set_bool /mnt/sdb/qemu/qom/object.c:1338
    #9 0x55ad177aeed7 in virtio_pci_realize /mnt/sdb/qemu/hw/virtio/virtio-pci.c:1801

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200224041336.30790-2-pannengyuan@huawei.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-02-25 08:32:45 -05:00
..
9pfs hw/9pfs/9p-synth: added directory for readdir test 2020-02-08 09:29:04 +01:00
acpi mem: move nvdimm_device_list to utilities 2020-02-21 09:15:03 +11:00
adc hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
alpha hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
arm arm: allwinner: Wire up USB ports 2020-02-21 16:07:02 +00:00
audio add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
block vhost-user-blk: delete virtioqueues in unrealize to fix memleaks 2020-02-25 08:32:45 -05:00
char hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init 2020-02-13 14:14:55 +00:00
core virtio: increase virtqueue size for virtio-scsi and virtio-blk 2020-02-22 08:26:47 +00:00
cpu qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
cris hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
display Fix memory leak with fdt 2020-02-20 16:51:19 +00:00
dma bcm2835_dma: Re-initialize xlen in TD mode 2020-02-07 14:04:28 +00:00
gpio hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
hppa hw/hppa/dino: Do not accept accesses to registers 0x818 and 0x82c 2020-02-18 11:22:10 -08:00
hyperv add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
i2c aspeed/i2c: Prevent uninitialized warning 2020-02-06 11:13:24 +01:00
i386 hw/i386/vmmouse: Fix crash when using the vmmouse on a machine without vmport 2020-02-06 11:02:48 +01:00
ide add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
input hw/input: Do not enable CONFIG_PCKBD by default 2020-02-04 09:01:31 +01:00
intc target/arm: Test correct register in aa32_pan and aa32_ats1e1 checks 2020-02-21 16:07:02 +00:00
ipack qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ipmi qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
isa hw/input: Do not enable CONFIG_PCKBD by default 2020-02-04 09:01:31 +01:00
lm32 hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
m68k hw/m68k/next-cube: Remove superfluous semicolon 2020-02-18 20:20:49 +01:00
mem spapr: Add NVDIMM device support 2020-02-21 09:15:04 +11:00
microblaze hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
mips hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
misc hw/misc/iotkit-secctl: Fix writing to 'PPC Interrupt Clear' register 2020-02-21 16:07:00 +00:00
moxie hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
net hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP) 2020-02-18 20:20:49 +01:00
nios2 hw/nios2:fix leak of fdevice tree blob 2020-02-19 10:32:50 +01:00
nubus hw/m68k: add Nubus support 2019-10-28 19:06:47 +01:00
nvram hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
openrisc hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
pci qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pci-bridge qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pci-host pnv/phb3: Add missing break statement 2020-02-21 09:15:04 +11:00
pcmcia hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
ppc hw/ppc/virtex_ml507:fix leak of fdevice tree blob 2020-02-21 09:15:04 +11:00
rdma qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
riscv riscv: virt: Use Goldfish RTC device 2020-02-10 12:01:38 -08:00
rtc hw: rtc: Add Goldfish RTC device 2020-02-10 12:01:37 -08:00
s390x hw/s390x/ipl: replace deprecated qdev_reset_all registration 2020-01-30 16:02:05 +00:00
scsi virtio: increase virtqueue size for virtio-scsi and virtio-blk 2020-02-22 08:26:47 +00:00
sd hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
semihosting semihosting: add qemu_semihosting_console_inc for SYS_READC 2020-01-09 11:41:29 +00:00
sh4 sh4: Fix PCI ISA IO memory subregion 2020-02-21 16:07:02 +00:00
smbios hw/smbios/smbios: Remove unused include 2020-02-06 10:38:57 +01:00
sparc hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
sparc64 hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
ssi xilinx_spips: Correct the number of dummy cycles for the FAST_READ_4 cmd 2020-02-21 16:07:02 +00:00
timer stm32f2xx_timer: delay timer_new to avoid memleaks 2020-02-07 14:04:28 +00:00
tpm hw/ppc/Kconfig: Enable TPM_SPAPR as part of PSERIES config 2020-02-02 14:07:57 +11:00
tricore hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
unicore32 Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
usb hcd-ehci: Introduce "companion-enable" sysbus property 2020-02-21 16:07:02 +00:00
vfio hw/vfio/display: Remove superfluous semicolon 2020-02-18 20:20:49 +01:00
virtio virtio-crypto: do delete ctrl_vq in virtio_crypto_device_unrealize 2020-02-25 08:32:45 -05:00
watchdog qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xen qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xenpv trivial: Remove xenfb_enabled from sysemu.h 2020-02-04 09:00:57 +01:00
xtensa hw/xtensa/xtfpga:fix leak of fdevice tree blob 2020-02-19 10:33:38 +01:00
Kconfig Remove the core bluetooth code 2019-12-17 09:01:14 +01:00
Makefile.objs Remove the core bluetooth code 2019-12-17 09:01:14 +01:00