linux/drivers/thermal
Geert Uytterhoeven 0b37a83a91 thermal: rcar: Fix race condition between init and interrupt
As soon as the interrupt has been enabled by devm_request_irq(), the
interrupt routine may be called, depending on the current status of the
hardware.

However, at that point rcar_thermal_common hasn't been initialized
complely yet. E.g. rcar_thermal_common.base is still NULL, causing a
NULL pointer dereference:

    Unable to handle kernel NULL pointer dereference at virtual address 0000000c
    pgd = c0004000
    [0000000c] *pgd=00000000
    Internal error: Oops: 5 [#1] SMP ARM
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-rc7-ape6evm-04564-gb6e46cb7cbe82389 #30
    Hardware name: Generic R8A73A4 (Flattened Device Tree)
    task: ee8953c0 ti: ee896000 task.ti: ee896000
    PC is at rcar_thermal_irq+0x1c/0xf0
    LR is at _raw_spin_lock_irqsave+0x48/0x54

Postpone the call to devm_request_irq() until all initialization has
been done to fix this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-02-24 14:56:42 -04:00
..
int340x_thermal Thermal/int340x_thermal: remove unused uuids. 2015-02-06 16:36:49 +08:00
samsung thermal: exynos: fix: Check if data->tmu_read callback is present before read 2015-02-20 21:57:02 +08:00
st Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ti-soc-thermal ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister" 2015-02-24 14:26:56 -04:00
armada_thermal.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-12-17 10:16:27 -08:00
clock_cooling.c thermal: introduce clock cooling device 2014-11-20 10:43:16 -04:00
cpu_cooling.c Merge branches 'thermal-core', 'thermal-soc' and 'thermal-int340x' of .git into next 2014-12-24 10:38:30 +08:00
db8500_cpufreq_cooling.c Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc 2014-12-21 22:49:12 +08:00
db8500_thermal.c thermal: drop owner assignment from platform_drivers 2014-10-20 16:21:42 +02:00
dove_thermal.c thermal: drop owner assignment from platform_drivers 2014-10-20 16:21:42 +02:00
fair_share.c thermal: trace: Trace when temperature is above a trip point 2014-07-29 09:28:43 -04:00
gov_bang_bang.c thermal: Added Bang-bang thermal governor 2014-08-27 15:45:58 +08:00
imx_thermal.c Thermal: imx: add clk disable/enable for suspend/resume 2015-01-06 09:35:15 -04:00
intel_powerclamp.c thermal/powerclamp: add ids for future xeon cpus 2014-12-21 21:36:41 +08:00
intel_soc_dts_thermal.c thermal: Intel SoC DTS: Add Braswell support 2015-01-29 11:28:01 +08:00
Kconfig thermal: rockchip: add driver for thermal 2014-11-24 14:35:07 -04:00
kirkwood_thermal.c thermal: drop owner assignment from platform_drivers 2014-10-20 16:21:42 +02:00
Makefile thermal: rockchip: add driver for thermal 2014-11-24 14:35:07 -04:00
of-thermal.c thermal: of: Enable thermal_zoneX when sensor is correctly added 2015-01-21 01:09:52 -04:00
rcar_thermal.c thermal: rcar: Fix race condition between init and interrupt 2015-02-24 14:56:42 -04:00
rockchip_thermal.c thermal: rockchip: make temperature reporting much more accurate 2015-01-24 23:38:36 -04:00
spear_thermal.c thermal: drop owner assignment from platform_drivers 2014-10-20 16:21:42 +02:00
step_wise.c thermal: step_wise: spelling fixes 2015-02-06 16:35:00 +08:00
tegra_soctherm.c thermal: of: improve of-thermal sensor registration API 2014-11-20 10:44:54 -04:00
thermal_core.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
thermal_core.h thermal: of: Remove bogus type qualifier for of_thermal_get_trip_points() 2015-01-05 16:03:22 -04:00
thermal_hwmon.c thermal: hwmon: Make the check for critical temp valid consistent 2014-06-30 10:17:27 +08:00
thermal_hwmon.h thermal: hwmon: move hwmon support to single file 2013-09-03 09:09:12 -04:00
user_space.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
x86_pkg_temp_thermal.c thermal, x86-pkg-temp: Fix CPU hotplug callback registration 2014-03-20 13:43:47 +01:00