Re: [PATCH] usb:xhci fix panic in xhci_free_virt_devices_depth_first

From: Chen Yu
Date: Mon Nov 06 2017 - 03:09:32 EST




On 2017/11/6 15:59, Greg KH wrote:
>>
>> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
>> index 2a82c927ded2..295789d993b0 100644
>> --- a/drivers/usb/host/xhci-mem.c
>> +++ b/drivers/usb/host/xhci-mem.c
>> @@ -947,6 +947,11 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id)
>> if (!vdev)
>> return;
>>
>> + if (WARN_ON(!vdev->real_port)) {
>> + xhci_warn(xhci, "Bad vdev->real_port\n");
>
> Why warn twice? What will that help?
>
> thanks,
>
> greg k-h
>
> .
>

I will fix that and send patch V2. Thanks!

Best regards
Yu Chen