kernel: ACPI: acpi_pad: Fix memory leak in power saving threads

Fix once per second (round_robin_time) memory leak of about 1 KB in
each acpi_pad kernel idling thread that is activated.

Found by testing with kmemleak.

as per: 8b29d29abc

Thanks @edrikk for letting know
arm-ng
pedro 7 years ago committed by kille72
parent 02f9495c6d
commit 036314e0f7

@ -122,6 +122,7 @@ static void round_robin_cpu(unsigned int tsk_index)
cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus);
if (cpumask_empty(tmp)) {
mutex_unlock(&isolated_cpus_lock);
free_cpumask_var(tmp);
return;
}
for_each_cpu(cpu, tmp) {
@ -139,6 +140,8 @@ static void round_robin_cpu(unsigned int tsk_index)
mutex_unlock(&isolated_cpus_lock);
set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu));
free_cpumask_var(tmp);
}
static void exit_round_robin(unsigned int tsk_index)

Loading…
Cancel
Save