Skip to content

Commit 8fa56ae

Browse files
stefan-haberlandMartin Schwidefsky
authored andcommitted
dasd: fix list_del corruption during format
If I/O errors occur during format a kernel panic with a list_del corruption may occur. Stop error recovery procedure after an erp action was taken. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 931a3dc commit 8fa56ae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/s390/block/dasd.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2307,8 +2307,12 @@ static int _dasd_sleep_on_queue(struct list_head *ccw_queue, int interruptible)
23072307

23082308
rc = 0;
23092309
list_for_each_entry_safe(cqr, n, ccw_queue, blocklist) {
2310-
if (__dasd_sleep_on_erp(cqr))
2310+
if (__dasd_sleep_on_erp(cqr)) {
2311+
if (!cqr->status == DASD_CQR_TERMINATED &&
2312+
!cqr->status == DASD_CQR_NEED_ERP)
2313+
break;
23112314
rc = 1;
2315+
}
23122316
}
23132317
if (rc)
23142318
goto retry;

0 commit comments

Comments
 (0)