Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-5.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"These fix CPU base frequency reporting in the intel_pstate driver and
a use-after-free in the scpi-cpufreq driver.

Specifics:

- Fix the ACPI CPPC library to actually follow the specification when
decoding the guaranteed performance register information and make
the intel_pstate driver to fall back to the nominal frequency when
reporting the base frequency if the guaranteed performance register
information is not there (Srinivas Pandruvada).

- Fix use-after-free in the exit callback of the scpi-cpufreq left
after an update during the 5.0 development cycle (Vincent Stehlé)"

* tag 'pm-5.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: scpi: Fix use after free
cpufreq: intel_pstate: Also use CPPC nominal_perf for base_frequency
ACPI / CPPC: Fix guaranteed performance handling

+12 -4
+7 -2
drivers/acpi/cppc_acpi.c
··· 1150 1150 cpc_read(cpunum, nominal_reg, &nom); 1151 1151 perf_caps->nominal_perf = nom; 1152 1152 1153 - cpc_read(cpunum, guaranteed_reg, &guaranteed); 1154 - perf_caps->guaranteed_perf = guaranteed; 1153 + if (guaranteed_reg->type != ACPI_TYPE_BUFFER || 1154 + IS_NULL_REG(&guaranteed_reg->cpc_entry.reg)) { 1155 + perf_caps->guaranteed_perf = 0; 1156 + } else { 1157 + cpc_read(cpunum, guaranteed_reg, &guaranteed); 1158 + perf_caps->guaranteed_perf = guaranteed; 1159 + } 1155 1160 1156 1161 cpc_read(cpunum, lowest_non_linear_reg, &min_nonlinear); 1157 1162 perf_caps->lowest_nonlinear_perf = min_nonlinear;
+4 -1
drivers/cpufreq/intel_pstate.c
··· 385 385 if (ret) 386 386 return ret; 387 387 388 - return cppc_perf.guaranteed_perf; 388 + if (cppc_perf.guaranteed_perf) 389 + return cppc_perf.guaranteed_perf; 390 + 391 + return cppc_perf.nominal_perf; 389 392 } 390 393 391 394 #else /* CONFIG_ACPI_CPPC_LIB */
+1 -1
drivers/cpufreq/scpi-cpufreq.c
··· 189 189 190 190 clk_put(priv->clk); 191 191 dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table); 192 - kfree(priv); 193 192 dev_pm_opp_remove_all_dynamic(priv->cpu_dev); 193 + kfree(priv); 194 194 195 195 return 0; 196 196 }