qemu-patch-raspberry4/hw/usb
Chen Qun 34b9d6a1f8 xhci: Fix memory leak in xhci_kick_epctx when poweroff GuestOS
start vm with libvirt, when GuestOS running, enter poweroff command using
the xhci keyboard, then ASAN shows memory leak stack:

Direct leak of 80 byte(s) in 5 object(s) allocated from:
    #0 0xfffd1e6431cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb)
    #1 0xfffd1e107163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163)
    #2 0xaaad39051367 in qemu_sglist_init /qemu/dma-helpers.c:43
    #3 0xaaad3947c407 in pci_dma_sglist_init /qemu/include/hw/pci/pci.h:842
    #4 0xaaad3947c407 in xhci_xfer_create_sgl /qemu/hw/usb/hcd-xhci.c:1446
    #5 0xaaad3947c407 in xhci_setup_packet /qemu/hw/usb/hcd-xhci.c:1618
    #6 0xaaad3948625f in xhci_submit /qemu/hw/usb/hcd-xhci.c:1827
    #7 0xaaad3948625f in xhci_fire_transfer /qemu/hw/usb/hcd-xhci.c:1839
    #8 0xaaad3948625f in xhci_kick_epctx /qemu/hw/usb/hcd-xhci.c:1991
    #9 0xaaad3948f537 in xhci_doorbell_write /qemu/hw/usb/hcd-xhci.c:3158
    #10 0xaaad38bcbfc7 in memory_region_write_accessor /qemu/memory.c:483
    #11 0xaaad38bc654f in access_with_adjusted_size /qemu/memory.c:544
    #12 0xaaad38bd1877 in memory_region_dispatch_write /qemu/memory.c:1482
    #13 0xaaad38b1c77f in flatview_write_continue /qemu/exec.c:3167
    #14 0xaaad38b1ca83 in flatview_write /qemu/exec.c:3207
    #15 0xaaad38b268db in address_space_write /qemu/exec.c:3297
    #16 0xaaad38bf909b in kvm_cpu_exec /qemu/accel/kvm/kvm-all.c:2383
    #17 0xaaad38bb063f in qemu_kvm_cpu_thread_fn /qemu/cpus.c:1246
    #18 0xaaad39821c93 in qemu_thread_start /qemu/util/qemu-thread-posix.c:519
    #19 0xfffd1c8378bb  (/lib64/libpthread.so.0+0x78bb)
    #20 0xfffd1c77616b  (/lib64/libc.so.6+0xd616b)

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-id: 20200110105855.81144-1-kuhn.chenqun@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-01-13 14:05:55 +01: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 usbaudio: change playback counters to 64 bit 2019-10-18 08:14:05 +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 usb-mtp: add sanity checks on rootdir 2019-08-29 07:31:12 +02:00
dev-network.c hw/usb: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01: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_kick_epctx when poweroff GuestOS 2020-01-13 14:05:55 +01:00
hcd-xhci.h Supply missing header guards 2019-06-12 13:20:21 +02:00
host-libusb.c usb-host: remove 'remote wakeup' flag from configuration descriptor 2020-01-13 09:17:31 +01: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: Remove the USB bluetooth dongle device 2019-12-16 17:24:07 +01:00
libhw.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
Makefile.objs hw/usb: Remove the USB bluetooth dongle device 2019-12-16 17:24:07 +01: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 usbredir: Prevent recursion in usbredir_write 2020-01-13 14:05:46 +01:00
trace-events usb-host: remove 'remote wakeup' flag from configuration descriptor 2020-01-13 09:17:31 +01: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