]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
thermal: ti-soc-thermal: Fix ti_thermal_unregister_cpu_cooling NULL pointer on unload
authorTony Lindgren <tony@atomide.com>
Mon, 16 Oct 2017 21:07:14 +0000 (14:07 -0700)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 1 Nov 2017 02:32:14 +0000 (19:32 -0700)
commitba817a8cfc2e128b59af7fe8b6af72ed38763b87
tree89e989d5250cfb7760cff71a00ffe0b68bb5d925
parentd668c807aa6ef3c3eef57b4e9e785ec0cfab4f6d
thermal: ti-soc-thermal: Fix ti_thermal_unregister_cpu_cooling NULL pointer on unload

While debugging some PM issues and trying to remove all the loaded modules, I ran
across the following when unloading ti-soc-thermal:

Unable to handle kernel NULL pointer dereference at virtual address 000000b4
...
[<c08db340>] (kobject_put) from [<bf28954c>] (ti_thermal_unregister_cpu_cooling+0x20/0x28 [ti_soc_thermal])
[<bf28954c>] (ti_thermal_unregister_cpu_cooling [ti_soc_thermal]) from [<bf287c88>] (ti_bandgap_remove+0x3c/0x104 [ti_soc_thermal])
[<bf287c88>] (ti_bandgap_remove [ti_soc_thermal]) from [<c0610d48>] (platform_drv_remove+0x24/0x3c)
[<c0610d48>] (platform_drv_remove) from [<c060f114>] (device_release_driver_internal+0x160/0x208)
[<c060f114>] (device_release_driver_internal) from [<c060f200>] (driver_detach+0x38/0x6c)
[<c060f200>] (driver_detach) from [<c060e2d4>] (bus_remove_driver+0x4c/0xa0)
[<c060e2d4>] (bus_remove_driver) from [<c01f2370>] (SyS_delete_module+0x168/0x238)
[<c01f2370>] (SyS_delete_module) from [<c0108240>] (ret_fast_syscall+0x0/0x28)

Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/ti-soc-thermal/ti-thermal-common.c