summaryrefslogtreecommitdiffstats
path: root/hw/usb/hcd-ehci.c
diff options
context:
space:
mode:
authorGonglei2015-03-18 10:33:46 +0100
committerGerd Hoffmann2015-03-20 08:50:01 +0100
commit537e572a7f807d7371a73ea5ffd9ce8d2487ff0c (patch)
tree9adc39094a372c025a81df49998cbfa3794c6dc1 /hw/usb/hcd-ehci.c
parenthw/usb: Include USB files only if necessary (diff)
downloadqemu-537e572a7f807d7371a73ea5ffd9ce8d2487ff0c.tar.gz
qemu-537e572a7f807d7371a73ea5ffd9ce8d2487ff0c.tar.xz
qemu-537e572a7f807d7371a73ea5ffd9ce8d2487ff0c.zip
uhci: fix segfault when hot-unplugging uhci 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>
Diffstat (limited to 'hw/usb/hcd-ehci.c')
0 files changed, 0 insertions, 0 deletions