Re: [PATCH v2] mfd: mc13xxx-core: Initialize the lock prior to using it

From: Lee Jones
Date: Wed Apr 16 2014 - 05:16:10 EST


> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
>
> After request_threaded_irq() is called there is a chance that an interrupt
> may occur before the 'mc13xxx->lock' is initialized, which will trigger a kernel
> oops.
>
> In order to prevent that, move the initialization of 'mc13xxx->lock' prior to
> requesting the interrupts.
>
> Suggested-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> ---
> Changes since v1:
> - Changed kernel warning --> kernel oops to better describe the problem
> - Added Russell's Ack

No you didn't. ;)

Applied with Russell's Ack.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/