Skip to contentSkip to conversation

libata: wrap schedule_timeout_uninterruptible() in loop

PATCH Applied Tejun Heo 2 participants 2 messages Oct 9, 2007 – Oct 10, 2007 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: wrap schedule_timeout_uninterruptible() in loop

Tasks in uninterruptible sleep might be woken up by unrelated events and should check whether the condition it was waiting for has actually triggered. Wrap schedule_timeout_uninterruptible() in loop to achieve it.

---
 drivers/ata/libata-eh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/ata/libata-eh.c +2 -1
index 866ac9d..8aa6140 100644
@@ -2183,7 +2183,8 @@ int ata_eh_reset(struct ata_link *link, int classify,
 				"(errno=%d), retrying in %u secs\n",
 				rc, (jiffies_to_msecs(delta) + 999) / 1000);
 
-			schedule_timeout_uninterruptible(delta);
+			while (delta)
+				delta = schedule_timeout_uninterruptible(delta);
 		}
 
 		if (rc == -EPIPE ||
Signature · 1 line
1.5.0.3
Applied
#1 lore raw
Quoted 9 lines · Tejun Heo

Tasks in uninterruptible sleep might be woken up by unrelated events and should check whether the condition it was waiting for has actually triggered. Wrap schedule_timeout_uninterruptible() in loop to achieve it.

---
 drivers/ata/libata-eh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

applied