]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hwmon: (max1111) Fix race condition causing NULL pointer
authorPavel Herrmann <morpheus.ibis@gmail.com>
Sun, 17 Jul 2011 16:39:19 +0000 (18:39 +0200)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:55:01 +0000 (13:55 -0700)
commit57090d5ee1e6ecfd74ecdc376d1246ff53aabd03
treef6e62da351a7973286317f225145a5f8d64d0e98
parentf537ef79e7eca73f3d8161411d8da63fe346f7cc
hwmon: (max1111) Fix race condition causing NULL pointer

[ upstream commit d3f684f2820a7f42acef68bea6622d9032127fb2 ]
 exception

spi_sync call uses its spi_message parameter to keep completion information,
using a drvdata structure is not thread-safe. Use a mutex to prevent
multiple access to shared driver data.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Cyril Hrubis <metan@ucw.cz>
Tested-by: Stanislav Brabec <utx@penguin.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/hwmon/max1111.c