qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [PATCH v3 2/3] ehci: fix segfault when hot-unplugging


From: Gonglei
Subject: Re: [Qemu-stable] [PATCH v3 2/3] ehci: fix segfault when hot-unplugging ehci controller
Date: Wed, 18 Mar 2015 17:06:12 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015/3/18 16:23, Gerd Hoffmann wrote:
> On Mi, 2015-03-18 at 09:49 +0800, address@hidden wrote:
>> 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.
> 
> Fails "make check" (for aarch64).  My guess is the sysbus variants lost
> the reset hookup.
> 
Actually, these fails were introduced by the follow patch:

commit c3cf77cb63b71618224129df41f114488e0f74e4
Author: David Gibson <address@hidden>
Date:   Wed Feb 18 16:01:01 2015 +1100

    Make sysbus EHCI devices ARM only by default

    A number of ARM embedded boards include EHCI USB host controllers which
    appear as directly mapped devices, rather than sitting on a PCI bus.

    At present code to emulate such devices is included whenever EHCI support
    is included.  This patch adjusts teh config options to only include them
    in builds targetting ARM by default.

But on the other hand, the sysbus variants lost the reset hookup is a real bug,
I will fix them in the next version. thanks!

Regards,
-Gonglei






reply via email to

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