diff options
author | Martin Peres <martin.peres@free.fr> | 2014-07-14 05:12:56 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-07-14 22:33:00 -0400 |
commit | bb78e7a12aa4898901d44bcb9d418f4188594427 (patch) | |
tree | dadc8f396c2fff7d24041eb79b86338baad4f49a /drivers/gpu | |
parent | 0b4e8e7fd506d4ddb96f71230252d14066ce1597 (diff) |
drm/nouveau/therm: fix a potential deadlock in the therm monitoring code
Signed-off-by: Martin Peres <martin.peres@free.fr>
Tested-by: Stefan Ringel <mail@stefanringel.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/temp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c index cfde9eb44ad0..6212537b90c5 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c | |||
@@ -192,11 +192,11 @@ alarm_timer_callback(struct nouveau_alarm *alarm) | |||
192 | nouveau_therm_threshold_hyst_polling(therm, &sensor->thrs_shutdown, | 192 | nouveau_therm_threshold_hyst_polling(therm, &sensor->thrs_shutdown, |
193 | NOUVEAU_THERM_THRS_SHUTDOWN); | 193 | NOUVEAU_THERM_THRS_SHUTDOWN); |
194 | 194 | ||
195 | spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags); | ||
196 | |||
195 | /* schedule the next poll in one second */ | 197 | /* schedule the next poll in one second */ |
196 | if (therm->temp_get(therm) >= 0 && list_empty(&alarm->head)) | 198 | if (therm->temp_get(therm) >= 0 && list_empty(&alarm->head)) |
197 | ptimer->alarm(ptimer, 1000 * 1000 * 1000, alarm); | 199 | ptimer->alarm(ptimer, 1000000000ULL, alarm); |
198 | |||
199 | spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags); | ||
200 | } | 200 | } |
201 | 201 | ||
202 | void | 202 | void |