[Zaurus-devel] [PATCH v2] MAX1111: Fix Race condition causing NULL pointer exception

Stanislav Brabec utx at penguin.cz
Mon Jul 11 16:56:31 EDT 2011


Pavel Herrmann wrote:
> spi_sync call uses its spi_message parameter to keep completion information,
> having this structure static is not thread-safe, potentially causing one
> thread having pointers to memory on or above other threads stack. use mutex
> to prevent multiple access
> 
> Signed-off-by: Pavel Herrmann <morpheus.ibis at gmail.com>
> Acked-by: Russell King <rmk+kernel at arm.linux.org.uk>
> Acked-by: Pavel Machek <pavel at ucw.cz>
> Acked-by: Marek Vasut <marek.vasut at gmail.com>
> Acked-by: Cyril Hrubis <metan at ucw.cz>
Tested-by: Stanislav Brabec <utx at penguin.cz>

Tested on spitz, fixed previously reproducible OOPSes and kernel panic.

(See thread "kernel panic in spi_complete() on spitz (PXA270)" in
linux-arm-kernel at lists.infradead.org.)

-- 

________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus




More information about the linux-arm-kernel mailing list