]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling
authorMartin Peres <martin.peres@labri.fr>
Thu, 13 Mar 2014 23:26:52 +0000 (00:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:18 +0000 (10:28 -0700)
commit92840945e295889bde76fb38531f11dafb34b506
tree6543ca0d94bf087d408da00e81680bdac2ba44e7
parent4fe6be724f7045fd6ecf59941b4f94fdd50f82b8
drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling

commit 61679fe153b2b9ea5b5e2ab93305419e85e99a9d upstream.

This should fix a deadlock that has been reported to us where fan_update()
would hold the fan lock and try to grab the alarm_program_lock to reschedule
an update. On an other CPU, the alarm_program_lock would have been taken
before calling fan_update(), leading to a deadlock.

We should Cc: <stable@vger.kernel.org> # 3.9+

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Timothée Ravier <tim@siosm.fr>
Tested-by: Boris Fersing (IRC nick fersingb, no public email address)
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/core/subdev/therm/fan.c