mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
Power management and ACPI fixes for v4.3-rc5
- Two fixes for cpufreq regressions, an acpi-cpufreq driver one
introduced during the 4.2 cycle when we started to preserve
cpufreq directories for offline CPUs and a general one
introduced recently (Srinivas Pandruvada).
- Two devfreq fixes, one for a double kfree() in an error code
path and one for a confusing sysfs-related failure (Geliang Tang,
Tobias Jakobi).
/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABCAAGBQJWGEL/AAoJEILEb/54YlRxnqsP/i9hnNDDhm1L+WW6YfB++BmY
LRhYSIKY73Q7ILXyk06tZLaOu5C1hohMNWfJKHJBROaMtSCgT1xE3OYD14a7QVQW
fWVejjOnOmxZOkgC/t7x6ZQBHSd/j8L+EFQkwWhU5Q7H7ezj4e7pf4pPZRvEz2rI
aJEipY7AYKGKB+q3RlkXsFZiMA59z1rebbZA+aOsIytZwtUhNL0XeTXuT+G3VQ0Z
YP65JZjXYvyl+JxkUhEGqcYK5VO2TBTrRuBqb9lUGo8IruKhIsEjnq9tsLtF69SX
HBJ1AS5dAxZOcRXHbea/8+nB4e1kPwKespqgCc8w4ggSz51uV+YI7lwiD5Py7dWc
3uZTpUv1fqiy0HM1br/IKus2KyZMglHx6k5MbtMrt/Xi1MFuG3b4sNcZs/tY6jXN
Jl3X+a0ne3zY2+XDQgwYEnqNnTUQyVDRSkbE8sG57Bs3T2EcXiaI2HF+9XuYnDLg
zC8T/VO9L122yGBnAakP5rtFapNB3AdHjJ0OTezTpOiAgekLkNX5/Yp+wI4ZJrog
jSDBeNDNsO717kttTD0hzUmcrLYCoLtn/oRnGEUxheT4QEUz+De8h9ycFaJOMaRp
sGs1y/Hv//4aj7XMSz3xmyhJ0GMsBmcmc5I/DIYpvHnHPvTHWU/+inTG/PhE3dKj
euPLl6ofOaoEjy0W+Jgg
=oLdU
-----END PGP SIGNATURE-----
Merge tag 'pm+acpi-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI fixes from Rafael Wysocki:
"These are four fixes for bugs in the devfreq and cpufreq subsystems,
including two regression fixes (one for a recent regression and one
for a problem introduced in 4.2).
Specifics:
- Two fixes for cpufreq regressions, an acpi-cpufreq driver one
introduced during the 4.2 cycle when we started to preserve cpufreq
directories for offline CPUs and a general one introduced recently
(Srinivas Pandruvada).
- Two devfreq fixes, one for a double kfree() in an error code path
and one for a confusing sysfs-related failure (Geliang Tang, Tobias
Jakobi)"
* tag 'pm+acpi-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: prevent lockup on reading scaling_available_frequencies
cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
PM / devfreq: fix double kfree
PM / devfreq: Fix governor_store()
This commit is contained in:
commit
149fadf2ce
|
|
@ -149,6 +149,9 @@ static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf)
|
|||
{
|
||||
struct acpi_cpufreq_data *data = policy->driver_data;
|
||||
|
||||
if (unlikely(!data))
|
||||
return -ENODEV;
|
||||
|
||||
return cpufreq_show_cpus(data->freqdomain_cpus, buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1436,8 +1436,10 @@ static void cpufreq_offline_finish(unsigned int cpu)
|
|||
* since this is a core component, and is essential for the
|
||||
* subsequent light-weight ->init() to succeed.
|
||||
*/
|
||||
if (cpufreq_driver->exit)
|
||||
if (cpufreq_driver->exit) {
|
||||
cpufreq_driver->exit(policy);
|
||||
policy->freq_table = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
|||
if (err) {
|
||||
put_device(&devfreq->dev);
|
||||
mutex_unlock(&devfreq->lock);
|
||||
goto err_dev;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
mutex_unlock(&devfreq->lock);
|
||||
|
|
@ -518,7 +518,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
|||
err_init:
|
||||
list_del(&devfreq->node);
|
||||
device_unregister(&devfreq->dev);
|
||||
err_dev:
|
||||
kfree(devfreq);
|
||||
err_out:
|
||||
return ERR_PTR(err);
|
||||
|
|
@ -795,8 +794,10 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr,
|
|||
ret = PTR_ERR(governor);
|
||||
goto out;
|
||||
}
|
||||
if (df->governor == governor)
|
||||
if (df->governor == governor) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (df->governor) {
|
||||
ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user