Re: [PATCH] mmc: omap_hsmmc: fix runtime suspend crash: add host checks in callbacks

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

 



On Sat, Jul 7, 2012 at 5:56 AM, Kevin Hilman <khilman@xxxxxx> wrote:
> Due to the way the driver core takes runtime PM references during
> probe, a driver's runtime PM callbacks may not be called until probe
> returns.  During probe, drvdata is set to the 'host' pointer but if
> probe fails, drvdata is set to NULL.
>
> The runtime PM callbacks currently blindly dereference this host
> pointer, but if probe fails, and the runtime PM callbacks are called
> after probe returns, a NULL pointer dereference will result.
>
Pardon my ignorance, but why would runtime suspend be called for a
device whose probe has failed ? AFAIK, MMC stack wouldn't make
the _enable()/disable() calls, which call runtime PM APIs, unless the
probe is successful.
 Is there a stacktrace for the offending caller ?

> Fix this by simply checking to be sure the host pointer is non-NULL.
>
> Signed-off-by: Kevin Hilman <khilman@xxxxxx>
> ---
> Applies to v3.5-rc5.  Fix is needed for v3.5-rc.
>
Can you please let me know which commit introduced this problem
in the first place ? There were not many changes in MMC PM code
in this merge window.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux