]> git.karo-electronics.de Git - karo-tx-linux.git/commit
acpi_pad: fix power_saving thread deadlock
authorStuart Hayes <Stuart_Hayes@Dell.com>
Wed, 13 Jun 2012 21:10:45 +0000 (16:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 15:47:40 +0000 (08:47 -0700)
commitc69499a1c8b4925248598f6eebf524968f92414f
tree758a9ac0a2fc93c5e1bab03b028c88dc23273f2b
parent9370dd38fdf9c18618efa68cb09daa5bab9885bb
acpi_pad: fix power_saving thread deadlock

commit 5f1601261050251a5ca293378b492a69d590dacb upstream.

The acpi_pad driver can get stuck in destroy_power_saving_task()
waiting for kthread_stop() to stop a power_saving thread.  The problem
is that the isolated_cpus_lock mutex is owned when
destroy_power_saving_task() calls kthread_stop(), which waits for a
power_saving thread to end, and the power_saving thread tries to
acquire the isolated_cpus_lock when it calls round_robin_cpu().  This
patch fixes the issue by making round_robin_cpu() use its own mutex.

https://bugzilla.kernel.org/show_bug.cgi?id=42981

Signed-off-by: Stuart Hayes <Stuart_Hayes@Dell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/acpi_pad.c