linux-stable/drivers/thermal/broadcom
Phil Elwell 6aa84e8a9f thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs
[ Upstream commit 35122495a8 ]

"cat /sys/kernel/debug/bcm2835_thermal/regset" causes a NULL pointer
dereference in bcm2835_thermal_debugfs. The driver makes use of the
implementation details of the thermal framework to retrieve a pointer
to its private data from a struct thermal_zone_device, and gets it
wrong - leading to the crash. Instead, store its private data as the
drvdata and retrieve the thermal_zone_device pointer from it.

Fixes: bcb7dd9ef2 ("thermal: bcm2835: add thermal driver for bcm2835 SoC")

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-20 09:15:01 +02:00
..
bcm2835_thermal.c thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs 2019-04-20 09:15:01 +02:00
Kconfig thermal: broadcom: ns-thermal: default on iProc SoCs 2017-05-23 20:09:34 -07:00
Makefile thermal: bcm2835: move to the broadcom subdirectory 2017-04-23 08:55:37 -07:00
ns-thermal.c