Re: 答复: 答复: 答复: 答复: 【xhci】suspend and resume core dump problem

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

 



Hi,

On 03/23/2016 11:38 AM, Lipengcheng wrote:
>> It looks like a wild pointer exists after xhci_mem_cleanup() is called.
>> >Let me try to reproduce it and seek for a fix.
>   
> Hi,
>    Thanks very much.
>    The kernel is 3.10 and is inevitable emergence. The kernel 3.18 is accidental, but I don't know the reason.
>
> Operation steps:
>
> usb usb1: root hub lost power or was reset
> usb usb2: root hub lost power or was reset
> usb usb3: root hub lost power or was reset
> usb usb4: root hub lost power or was reset
> usb 1-2: reset high-speed USB device number 2 using hiusb-ehci
> ^Cusb usb5: root hub lost power or was reset                   <-press ctrl +c  and the problem will happen
> usb usb6: root hub lost power or was reset

Can you please test below change? It doesn't fix your dma_alloc_coherent() failure
issue. It is supposed to fix the core dump issue when dma_alloc_coherent() fails in
xhci_mem_init().

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 80c1de2..53fe4ad 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1860,6 +1860,11 @@ no_bw:
        kfree(xhci->port_array);
        kfree(xhci->rh_bw);
        kfree(xhci->ext_caps);
+       xhci->usb2_ports = NULL;
+       xhci->usb3_ports = NULL;
+       xhci->port_array = NULL;
+       xhci->rh_bw = NULL;
+       xhci->ext_caps = NULL;
 
        xhci->page_size = 0;
        xhci->page_shift = 0;

Best regards,
Baolu

> Thanks,
> Pengcheng Li

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux