Home
last modified time | relevance | path

Searched hist:"537 e572a7f807d7371a73ea5ffd9ce8d2487ff0c" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/usb/
H A Dhcd-uhci.cdiff 537e572a7f807d7371a73ea5ffd9ce8d2487ff0c Wed Mar 18 04:33:46 CDT 2015 Gonglei <arei.gonglei@huawei.com> 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>