Krzysztof Kozlowski
ba5e770c96
cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit
...
Commit 054a3ef683a1 ("cpufreq: qcom-hw: Allocate qcom_cpufreq_data
during probe") moved getting memory resource and iomap from
qcom_cpufreq_hw_cpu_init() to the probe function, however it left
untouched cleanup in qcom_cpufreq_hw_cpu_exit().
During device unbind this will lead to doule release of resource and
double iounmap(), first by qcom_cpufreq_hw_cpu_exit() and second via
managed resources:
resource: Trying to free nonexistent resource <0x0000000018593000-0x0000000018593fff>
Trying to vunmap() nonexistent vm area (0000000088a7d4dc)
...
vunmap (mm/vmalloc.c:2771 (discriminator 1))
iounmap (mm/ioremap.c:60)
devm_ioremap_release (lib/devres.c:19)
devres_release_all (drivers/base/devres.c:506 drivers/base/devres.c:535)
device_unbind_cleanup (drivers/base/dd.c:523)
device_release_driver_internal (drivers/base/dd.c:1248 drivers/base/dd.c:1263)
device_driver_detach (drivers/base/dd.c:1300)
unbind_store (drivers/base/bus.c:243)
drv_attr_store (drivers/base/bus.c:127)
sysfs_kf_write (fs/sysfs/file.c:137)
kernfs_fop_write_iter (fs/kernfs/file.c:334)
vfs_write (include/linux/fs.h:1851 fs/read_write.c:491 fs/read_write.c:584)
ksys_write (fs/read_write.c:637)
__arm64_sys_write (fs/read_write.c:646)
invoke_syscall (arch/arm64/include/asm/current.h:19 arch/arm64/kernel/syscall.c:57)
el0_svc_common.constprop.0 (arch/arm64/include/asm/daifflags.h:28 arch/arm64/kernel/syscall.c:150)
do_el0_svc (arch/arm64/kernel/syscall.c:194)
el0_svc (arch/arm64/include/asm/daifflags.h:28 arch/arm64/kernel/entry-common.c:133 arch/arm64/kernel/entry-common.c:142 arch/arm64/kernel/entry-common.c:638)
el0t_64_sync_handler (arch/arm64/kernel/entry-common.c:656)
el0t_64_sync (arch/arm64/kernel/entry.S:591)
Fixes: 054a3ef683a1 ("cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe")
Cc: <stable@vger.kernel.org>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-03-30 09:21:00 +05:30
..
2022-12-06 12:12:40 +01:00
2022-11-30 19:50:04 +01:00
2021-12-30 18:51:39 +01:00
2022-03-09 19:53:01 +01:00
2022-11-16 08:38:19 -07:00
2023-02-23 20:01:23 +01:00
2023-03-01 19:34:54 +01:00
2020-12-07 13:02:37 +05:30
2023-01-10 09:32:03 +05:30
2022-08-30 13:49:23 +05:30
2023-02-09 20:19:18 +01:00
2022-12-27 08:27:14 +05:30
2022-03-10 19:55:05 +01:00
2022-02-04 19:22:34 +01:00
2022-04-13 15:22:41 +02:00
2022-04-13 15:22:41 +02:00
2022-07-25 20:38:01 +02:00
2019-06-19 17:09:55 +02:00
2020-11-10 18:31:17 +01:00
2020-11-10 18:31:17 +01:00
2022-12-06 12:20:07 +01:00
2020-07-02 13:03:30 +02:00
2023-03-13 09:58:11 +05:30
2022-10-18 16:22:25 +05:30
2020-03-12 15:43:52 +05:30
2020-01-27 10:33:33 +01:00
2023-02-09 20:29:32 +01:00
2023-02-09 20:26:42 +01:00
2020-10-27 18:42:54 +01:00
2020-03-24 21:31:27 +01:00
2023-03-13 09:57:43 +05:30
2020-01-27 10:33:33 +01:00
2022-09-26 11:15:04 +05:30
2021-03-19 17:26:20 +01:00
2023-03-13 09:58:11 +05:30
2023-03-13 09:58:11 +05:30
2023-03-03 10:30:58 -08:00
2023-02-21 12:13:58 -08:00
2023-01-16 09:26:06 +01:00
2019-11-29 11:52:02 +01:00
2022-11-22 19:57:15 +01:00
2020-01-07 13:29:58 +05:30
2022-11-03 19:13:34 +01:00
2019-05-30 11:26:39 -07:00
2020-03-24 21:31:27 +01:00
2021-06-07 17:43:52 +02:00
2023-02-21 12:13:58 -08:00
2019-07-18 09:49:30 +02:00
2023-02-14 15:25:07 +01:00
2023-03-30 09:20:02 +05:30
2022-06-10 14:51:35 +02:00
2023-02-09 20:19:18 +01:00
2020-08-23 17:36:59 -05:00
2022-04-13 17:18:45 +02:00
2020-07-15 15:17:06 +02:00
2022-06-28 13:34:51 +05:30
2022-04-13 17:18:45 +02:00
2020-03-24 21:31:27 +01:00
2020-03-24 21:31:27 +01:00
2019-05-30 11:26:39 -07:00
2022-03-17 14:54:11 +01:00
2019-06-05 17:37:08 +02:00
2021-10-05 16:33:05 +02:00
2022-04-13 17:18:45 +02:00
2022-04-13 17:18:45 +02:00
2019-08-26 10:02:01 +02:00
2022-05-07 22:55:49 +02:00
2022-05-07 22:55:49 +02:00
2023-03-30 09:21:00 +05:30
2022-10-18 16:22:26 +05:30
2022-06-28 13:34:45 +05:30
2019-06-13 08:58:22 +05:30
2019-10-23 08:53:23 +05:30
2021-10-05 16:33:05 +02:00
2023-01-12 10:53:12 +01:00
2021-05-21 18:52:13 +02:00
2023-03-13 09:58:11 +05:30
2022-06-10 14:51:36 +02:00
2021-09-02 18:04:17 +02:00
2022-11-03 19:15:45 +01:00
2020-03-24 21:31:27 +01:00
2020-03-24 21:31:27 +01:00
2020-10-28 18:04:07 +01:00
2019-05-30 11:26:39 -07:00
2020-03-24 21:31:27 +01:00
2022-09-26 11:15:04 +05:30
2022-10-18 16:22:26 +05:30
2023-03-13 09:58:11 +05:30
2023-03-13 09:57:42 +05:30
2022-12-01 14:49:50 +05:30
2023-02-06 09:31:38 +05:30
2022-11-07 15:30:11 +05:30
2021-10-04 11:25:21 +05:30