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)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 26 Mar 2014 04:08:24 +0000 (14:08 +1000)
commit61679fe153b2b9ea5b5e2ab93305419e85e99a9d
tree4ee9e9b60320cc6f97c5b0dde16a30542d2f3111
parent6c3252bc83155ae69d78fefdc7458aa64d8a87db
drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling

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>
drivers/gpu/drm/nouveau/core/subdev/therm/fan.c