Re: [PATCH 1/1] usb: chipidea: ehci_init_driver is intended to call one time

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

 



On Tue, 21 Jul 2015, Peter Chen wrote:

> The ehci_init_driver is used to initialize hcd APIs for each
> ehci controller driver, it is designed to be called only one time
> and before driver register is called. The current design will
> cause ehci_init_driver is called multiple times at probe process,
> it will cause hc_driver's initialization affect current running hcd.
> 
> We run out NULL pointer dereference problem when one hcd is started
> by module_init, and the other is started by otg thread at SMP platform.
> The reason for this problem is ehci_init_driver will do memory copy
> for current uniform hc_driver, and this memory copy will do memset (as 0)
> first, so when the first hcd is running usb_add_hcd, and the second
> hcd may clear the uniform hc_driver's space (at ehci_init_driver),
> then the first hcd will meet NULL pointer at the same time.

> Cc: Jun Li <jun.li@xxxxxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx>

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]