aboutsummaryrefslogtreecommitdiff
path: root/qemu-coroutine-sleep.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2015-03-18 17:33:46 +0800
committerGerd Hoffmann <kraxel@redhat.com>2015-03-20 08:50:01 +0100
commit537e572a7f807d7371a73ea5ffd9ce8d2487ff0c (patch)
tree9adc39094a372c025a81df49998cbfa3794c6dc1 /qemu-coroutine-sleep.c
parent8ffd9f4dd41f0423f0df8bef8f2e25ab4bb1a3f3 (diff)
downloadqemu-537e572a7f807d7371a73ea5ffd9ce8d2487ff0c.zip
qemu-537e572a7f807d7371a73ea5ffd9ce8d2487ff0c.tar.gz
qemu-537e572a7f807d7371a73ea5ffd9ce8d2487ff0c.tar.bz2
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 'qemu-coroutine-sleep.c')
0 files changed, 0 insertions, 0 deletions