qemu-e2k/hw/usb
Gonglei 4e289b1b62 ehci: fix segfault when hot-unplugging ehci controller
When hot-unplugging the usb controllers (ehci/uhci),
we have to clean all resouce of these devices,
involved registered reset handler. Otherwise, it
may cause NULL pointer access and/or segmentation fault
if we reboot the guest os after hot-unplugging.

Let's hook up reset via DeviceClass->reset() and drop
the qemu_register_reset() call. Then Qemu will register
and unregister the reset handler automatically.

Cc: qemu-stable <qemu-stable@nongnu.org>
Reported-by: Lidonglin <lidonglin@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-03-20 08:50:12 +01:00
..
bus.c usb: Improve companion configuration error messages 2015-03-17 14:11:43 +01:00
ccid-card-emulated.c
ccid-card-passthru.c
ccid.h
combined-packet.c
core.c
desc-msos.c usb: Pair g_malloc() with g_free(), not free() 2015-02-10 09:27:20 +03:00
desc.c
desc.h
dev-audio.c
dev-bluetooth.c usb: Improve -usbdevice error reporting a bit 2015-02-18 10:53:10 +01:00
dev-hid.c
dev-hub.c
dev-mtp.c
dev-network.c QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use 2015-02-26 14:49:31 +01:00
dev-serial.c usb: Improve -usbdevice error reporting a bit 2015-02-18 10:53:10 +01:00
dev-smartcard-reader.c
dev-storage.c usb/dev-storage: Avoid qerror_report_err() outside QMP handlers 2015-03-17 14:23:53 +01:00
dev-uas.c
dev-wacom.c
hcd-ehci-pci.c ehci: fix segfault when hot-unplugging ehci controller 2015-03-20 08:50:12 +01:00
hcd-ehci-sysbus.c ehci: fix segfault when hot-unplugging ehci controller 2015-03-20 08:50:12 +01:00
hcd-ehci.c ehci: fix segfault when hot-unplugging ehci controller 2015-03-20 08:50:12 +01:00
hcd-ehci.h ehci: fix segfault when hot-unplugging ehci controller 2015-03-20 08:50:12 +01:00
hcd-musb.c
hcd-ohci.c ohci: fix resource cleanup leak 2015-03-20 08:50:06 +01:00
hcd-uhci.c uhci: fix segfault when hot-unplugging uhci controller 2015-03-20 08:50:01 +01:00
hcd-xhci.c pci, pc, virtio fixes and cleanups 2015-03-09 09:14:28 +00:00
host-legacy.c usb: Improve -usbdevice error reporting a bit 2015-02-18 10:53:10 +01:00
host-libusb.c Clean up around error_get_pretty(), qerror_report_err() 2015-02-26 07:01:08 +00:00
host-stub.c hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() 2015-02-18 11:58:50 +01:00
host.h
libhw.c
Makefile.objs hw/usb: Include USB files only if necessary 2015-03-18 11:50:47 +01:00
quirks-ftdi-ids.h
quirks-pl2303-ids.h
quirks.c
quirks.h
redirect.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00