qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [PATCH v4 0/3] usb: fix segfault when hot-unplugging usb h


From: arei.gonglei
Subject: [Qemu-stable] [PATCH v4 0/3] usb: fix segfault when hot-unplugging usb host adapter
Date: Wed, 18 Mar 2015 17:33:45 +0800

From: Gonglei <address@hidden>

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 <address@hidden>

v4 -> v3:
 - add reset hookup for sysbus devices (ehci/ohci). (Gerd)

v2 -> v3:
 - rewrite each patch's title

v1 -> v2:
 - hooking up reset via DeviceClass->reset 
 and drop the qemu_register_reset() calls.   (Gerd)

Gonglei (3):
  uhci: fix segfault when hot-unplugging uhci controller
  ehci: fix segfault when hot-unplugging ehci controller
  ohci: fix resource cleanup leak

 hw/usb/hcd-ehci-pci.c    | 10 ++++++++++
 hw/usb/hcd-ehci-sysbus.c | 10 ++++++++++
 hw/usb/hcd-ehci.c        |  3 +--
 hw/usb/hcd-ehci.h        |  1 +
 hw/usb/hcd-ohci.c        | 20 +++++++++++++++++++-
 hw/usb/hcd-uhci.c        | 12 ++++++------
 6 files changed, 47 insertions(+), 9 deletions(-)

-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]