Commit 64b1cbaa1068f38994230df2aa0fee7033008399
Exists in
master
and in
20 other branches
Merge tag 'pm+acpi-for-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI fixes from Rafael J Wysocki: - Fix for a memory leak in acpi_bind_one() from Jesper Juhl. - Fix for an error code path memory leak in pm_genpd_attach_cpuidle() from Jonghwan Choi. - Fix for smp_processor_id() usage in preemptible code in powernow-k8 from Andreas Herrmann. - Fix for a suspend-related memory leak in cpufreq stats from Xiaobing Tu. - Freezer fix for failure to clear PF_NOFREEZE along with PF_KTHREAD in flush_old_exec() from Oleg Nesterov. - acpi_processor_notify() fix from Alan Cox. * tag 'pm+acpi-for-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: missing break freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD Fix memory leak in cpufreq stats. cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code PM / Domains: Fix memory leak on error path in pm_genpd_attach_cpuidle ACPI: Fix memory leak in acpi_bind_one()
Showing 6 changed files Side-by-side Diff
drivers/acpi/glue.c
drivers/acpi/processor_driver.c
... | ... | @@ -409,6 +409,7 @@ |
409 | 409 | acpi_bus_generate_proc_event(device, event, 0); |
410 | 410 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
411 | 411 | dev_name(&device->dev), event, 0); |
412 | + break; | |
412 | 413 | default: |
413 | 414 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
414 | 415 | "Unsupported event [0x%x]\n", event)); |
drivers/base/power/domain.c
... | ... | @@ -1862,7 +1862,7 @@ |
1862 | 1862 | cpuidle_drv = cpuidle_driver_ref(); |
1863 | 1863 | if (!cpuidle_drv) { |
1864 | 1864 | ret = -ENODEV; |
1865 | - goto out; | |
1865 | + goto err_drv; | |
1866 | 1866 | } |
1867 | 1867 | if (cpuidle_drv->state_count <= state) { |
1868 | 1868 | ret = -EINVAL; |
... | ... | @@ -1884,6 +1884,9 @@ |
1884 | 1884 | |
1885 | 1885 | err: |
1886 | 1886 | cpuidle_driver_unref(); |
1887 | + | |
1888 | + err_drv: | |
1889 | + kfree(cpu_data); | |
1887 | 1890 | goto out; |
1888 | 1891 | } |
1889 | 1892 |
drivers/cpufreq/cpufreq_stats.c
drivers/cpufreq/powernow-k8.c
... | ... | @@ -1052,14 +1052,7 @@ |
1052 | 1052 | struct powernowk8_target_arg pta = { .pol = pol, .targfreq = targfreq, |
1053 | 1053 | .relation = relation }; |
1054 | 1054 | |
1055 | - /* | |
1056 | - * Must run on @pol->cpu. cpufreq core is responsible for ensuring | |
1057 | - * that we're bound to the current CPU and pol->cpu stays online. | |
1058 | - */ | |
1059 | - if (smp_processor_id() == pol->cpu) | |
1060 | - return powernowk8_target_fn(&pta); | |
1061 | - else | |
1062 | - return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta); | |
1055 | + return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta); | |
1063 | 1056 | } |
1064 | 1057 | |
1065 | 1058 | /* Driver entry point to verify the policy and range of frequencies */ |
fs/exec.c
... | ... | @@ -1083,7 +1083,8 @@ |
1083 | 1083 | bprm->mm = NULL; /* We're using it now */ |
1084 | 1084 | |
1085 | 1085 | set_fs(USER_DS); |
1086 | - current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD); | |
1086 | + current->flags &= | |
1087 | + ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE); | |
1087 | 1088 | flush_thread(); |
1088 | 1089 | current->personality &= ~bprm->per_clear; |
1089 | 1090 |