Re: [PATCH v2] usb: dwc3: omap: fix race of pm runtime with irq handler in probe

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

 



* Grygorii Strashko <grygorii.strashko@xxxxxx> [161212 11:38]:
> Now races can happen between interrupt handler execution and PM runtime in
> error handling code path in probe and in dwc3_omap_remove() which will lead
> to system crash:
> 
> in probe:
> ...
>  err1:
> 	pm_runtime_put_sync(dev);
> ^^ PM runtime can race with IRQ handler when deferred probing happening
>    due to extcon
> 	pm_runtime_disable(dev);
> 
> 	return ret;
> 
> in dwc3_omap_remove:
> ...
> 	dwc3_omap_disable_irqs(omap);
> ^^ IRQs are disabled in HW, but handler may still run
> 	of_platform_depopulate(omap->dev);
> 	pm_runtime_put_sync(&pdev->dev);
> ^^ PM runtime can race with IRQ handler
> 	pm_runtime_disable(&pdev->dev);
> 
> 	return 0;
> 
> So, OMAP DWC3 IRQ need to be disabled before calling
> pm_runtime_put() in probe and in dwc3_omap_remove().

Acked-by: Tony Lindgren <tony@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux