OpenCloudOS-Kernel/include
Rafael J. Wysocki a95a9e3089 thermal: core: Make thermal_zone_device_unregister() return after freeing the zone
[ Upstream commit 4649620d9404d3aceb25891c24bab77143e3f21c ]

Make thermal_zone_device_unregister() wait until all of the references
to the given thermal zone object have been dropped and free it before
returning.

This guarantees that when thermal_zone_device_unregister() returns,
there is no leftover activity regarding the thermal zone in question
which is required by some of its callers (for instance, modular driver
code that wants to know when it is safe to let the module go away).

Subsequently, this will allow some confusing device_is_registered()
checks to be dropped from the thermal sysfs and core code.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-and-tested-by: Lukasz Luba <lukasz.luba@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Stable-dep-of: 827a07525c09 ("thermal: core: Free tzp copy along with the thermal zone")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 16:28:16 +01:00
..
acpi cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf}() 2024-11-01 01:58:32 +01:00
asm-generic vmlinux.lds.h: catch .bss..L* sections into BSS") 2024-08-03 08:53:35 +02:00
clocksource pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode. 2024-09-08 07:54:44 +02:00
crypto crypto: simd - Do not call crypto_alloc_tfm during registration 2024-10-10 11:57:26 +02:00
drm drm/printer: Allow NULL data in devcoredump printer 2024-10-10 11:57:36 +02:00
dt-bindings dt-bindings: clock: qcom: Add GPLL9 support on gcc-sc8180x 2024-10-10 11:58:04 +02:00
keys
kunit
kvm KVM: arm64: Fix host-programmed guest events in nVHE 2024-04-10 16:35:48 +02:00
linux thermal: core: Make thermal_zone_device_unregister() return after freeing the zone 2024-11-08 16:28:16 +01:00
math-emu
media media: cec: core: avoid recursive cec_claim_log_addrs 2024-06-12 11:12:43 +02:00
memory
misc
net Bluetooth: SCO: Fix UAF on sco_sock_timeout 2024-11-01 01:58:30 +01:00
pcmcia
ras
rdma RDMA/core: Fix umem iterator when PAGE_SIZE is greater then HCA pgsz 2023-12-13 18:45:16 +01:00
rv rv: Set variable 'da_mon_##name' to static 2023-09-01 21:00:00 -04:00
scsi scsi: Remove scsi device no_start_on_resume flag 2024-10-17 15:24:11 +02:00
soc net: mscc: ocelot: serialize access to the injection/extraction groups 2024-08-29 17:33:45 +02:00
sound ASoC: tas2781: mark dvc_tlv with __maybe_unused 2024-10-17 15:24:11 +02:00
target
trace mm: khugepaged: fix the arguments order in khugepaged_collapse_file trace point 2024-11-01 01:58:26 +01:00
uapi bpf: Add cookie to perf_event bpf_link_info records 2024-11-01 01:58:19 +01:00
ufs scsi: ufs: core: Check LSDBS cap when !mcq 2024-09-08 07:54:29 +02:00
vdso
video fbdev: stifb: Make the STI next font pointer a 32-bit signed offset 2023-11-28 17:19:58 +00:00
xen xen/events: reduce externally visible helper functions 2024-03-01 13:34:57 +01:00