w1_therm reference count family data
commitd1e78f3cdb81d9eab27247d234242c09a859114b
authorDavid Fries <David@Fries.net>
Sat, 9 May 2015 00:51:50 +0000 (8 19:51 -0500)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 4 Jul 2015 03:02:19 +0000 (3 23:02 -0400)
tree37229146ec16c995a91b8fc46206a76494d40321
parent4b36d918f7e8dbabb4c96db4936ebb10a5d13ac3
w1_therm reference count family data

[ Upstream commit f7134eea05b2fb4a2c0935f8a540539fff01f3eb ]

A temperature conversion can take 750 ms and when possible the
w1_therm slave driver drops the bus_mutex to allow other bus
operations, but that includes operations such as a periodic slave
search, which can remove this slave when it is no longer detected.
If that happens the sl->family_data will be freed and set to NULL
causing w1_slave_show to crash when it wakes up.

Signed-off-by: David Fries <David@Fries.net>
Reported-By: Thorsten Bschorr <thorsten@bschorr.de>
Tested-by: Thorsten Bschorr <thorsten@bschorr.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/w1/slaves/w1_therm.c