Commit c1a485c
cpufreq: Reference count policy in cpufreq_update_limits()
commit 9e4e249 upstream.
Since acpi_processor_notify() can be called before registering a cpufreq
driver or even in cases when a cpufreq driver is not registered at all,
cpufreq_update_limits() needs to check if a cpufreq driver is present
and prevent it from being unregistered.
For this purpose, make it call cpufreq_cpu_get() to obtain a cpufreq
policy pointer for the given CPU and reference count the corresponding
policy object, if present.
Fixes: 5a25e3f ("cpufreq: intel_pstate: Driver-specific handling of _PPC updates")
Closes: https://lore.kernel.org/linux-acpi/Z-ShAR59cTow0KcR@mail-itl
Reported-by: Marek Marczykowski-Górecki <[email protected]>
Cc: All applicable <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Link: https://patch.msgid.link/[email protected]
[do not use __free(cpufreq_cpu_put) in a backport]
Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 686d8f7 commit c1a485c
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2748 | 2748 | | |
2749 | 2749 | | |
2750 | 2750 | | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
2751 | 2757 | | |
2752 | 2758 | | |
2753 | 2759 | | |
2754 | 2760 | | |
| 2761 | + | |
| 2762 | + | |
2755 | 2763 | | |
2756 | 2764 | | |
2757 | 2765 | | |
| |||
0 commit comments