diff options
author | Martin Peres <martin.peres@free.fr> | 2014-07-14 11:12:56 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-07-15 12:31:07 +1000 |
commit | c5bacfd50dfa8e4594bcd9ae2d71942076e5dbb7 (patch) | |
tree | b19b55e445d5ab49c87fbd1c3f04c8d71b7ec45c | |
parent | 4a25ca4701015e186c9e2ca4486583458c8f1175 (diff) |
therm: fix a potential deadlock in the therm monitoring codelinux-3.16
Signed-off-by: Martin Peres <martin.peres@free.fr>
Tested-by: Stefan Ringel <mail@stefanringel.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | nvkm/subdev/therm/temp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nvkm/subdev/therm/temp.c b/nvkm/subdev/therm/temp.c index cfde9eb4..6212537b 100644 --- a/nvkm/subdev/therm/temp.c +++ b/nvkm/subdev/therm/temp.c @@ -192,11 +192,11 @@ alarm_timer_callback(struct nouveau_alarm *alarm) nouveau_therm_threshold_hyst_polling(therm, &sensor->thrs_shutdown, NOUVEAU_THERM_THRS_SHUTDOWN); + spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags); + /* schedule the next poll in one second */ if (therm->temp_get(therm) >= 0 && list_empty(&alarm->head)) - ptimer->alarm(ptimer, 1000 * 1000 * 1000, alarm); - - spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags); + ptimer->alarm(ptimer, 1000000000ULL, alarm); } void |