qemu-patch-raspberry4/hw/usb
Ying Fang c9e3859262 xhci: Fix memory leak in xhci_address_slot
Address Sanitizer shows memory leak in xhci_address_slot
hw/usb/hcd-xhci.c:2156 and the stack is as bellow:

Direct leak of 64 byte(s) in 4 object(s) allocated from:
    #0 0xffff91c6f5ab in realloc (/lib64/libasan.so.4+0xd35ab)
    #1 0xffff91987243 in g_realloc (/lib64/libglib-2.0.so.0+0x57243)
    #2 0xaaaab0b26a1f in qemu_iovec_add util/iov.c:296
    #3 0xaaaab07e5ce3 in xhci_address_slot hw/usb/hcd-xhci.c:2156
    #4 0xaaaab07e5ce3 in xhci_process_commands hw/usb/hcd-xhci.c:2493
    #5 0xaaaab00058d7 in memory_region_write_accessor qemu/memory.c:507
    #6 0xaaaab0000d87 in access_with_adjusted_size memory.c:573
    #7 0xaaaab000abcf in memory_region_dispatch_write memory.c:1516
    #8 0xaaaaaff59947 in flatview_write_continue exec.c:3367
    #9 0xaaaaaff59c33 in flatview_write exec.c:3406
    #10 0xaaaaaff63b3b in address_space_write exec.c:3496
    #11 0xaaaab002f263 in kvm_cpu_exec accel/kvm/kvm-all.c:2288
    #12 0xaaaaaffee427 in qemu_kvm_cpu_thread_fn cpus.c:1290
    #13 0xaaaab0b1a943 in qemu_thread_start util/qemu-thread-posix.c:502
    #14 0xffff908ce8bb in start_thread (/lib64/libpthread.so.0+0x78bb)
    #15 0xffff908165cb in thread_start (/lib64/libc.so.6+0xd55cb)

Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-id: 20190827080209.2365-1-fangying1@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-08-29 07:29:44 +02:00
..
bus.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccid-card-emulated.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccid-card-passthru.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccid.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
chipidea.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
combined-packet.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
core.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
desc-msos.c usb: use local path for local headers 2018-06-01 19:20:38 +03:00
desc.c usb: use local path for local headers 2018-06-01 19:20:38 +03:00
desc.h all: Clean up includes 2016-02-23 12:43:05 +00:00
dev-audio.c audio: add audiodev properties to frontends 2019-08-21 09:13:37 +02:00
dev-bluetooth.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
dev-hid.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-hub.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-mtp.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-network.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-serial.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-smartcard-reader.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-storage.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-uas.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
dev-wacom.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
hcd-ehci-pci.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hcd-ehci-sysbus.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hcd-ehci.c ehci: fix queue->dev null ptr dereference 2019-08-22 06:55:29 +02:00
hcd-ehci.h sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h 2019-08-16 13:31:53 +02:00
hcd-musb.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
hcd-ohci-pci.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hcd-ohci.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hcd-ohci.h hw/usb/hcd-ohci: Move PCI-related code into a separate file 2019-05-02 08:42:17 +02:00
hcd-uhci.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hcd-xhci-nec.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hcd-xhci.c xhci: Fix memory leak in xhci_address_slot 2019-08-29 07:29:44 +02:00
hcd-xhci.h Supply missing header guards 2019-06-12 13:20:21 +02:00
host-libusb.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
host-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
host.h usb-host: move legacy cmd line bits 2013-02-19 12:30:05 +01:00
Kconfig hw/usb/Kconfig: USB_XHCI_NEC requires USB_XHCI 2019-07-15 20:58:37 +02:00
libhw.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
Makefile.objs hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI 2019-07-15 20:58:37 +02:00
quirks-ftdi-ids.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks-pl2303-ids.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
quirks.h Supply missing header guards 2019-06-12 13:20:21 +02:00
redirect.c usb-redir: merge interrupt packets 2019-08-21 10:42:00 +02:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
tusb6010.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
xen-usb.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00