Skip to content

Commit

Permalink
dasd: fix list_del corruption during format
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Haberland authored and Martin Schwidefsky committed Jul 22, 2014
1 parent 931a3dc commit 8fa56ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,8 +2307,12 @@ static int _dasd_sleep_on_queue(struct list_head *ccw_queue, int interruptible)

rc = 0;
list_for_each_entry_safe(cqr, n, ccw_queue, blocklist) {
if (__dasd_sleep_on_erp(cqr))
if (__dasd_sleep_on_erp(cqr)) {
if (!cqr->status == DASD_CQR_TERMINATED &&
!cqr->status == DASD_CQR_NEED_ERP)
break;
rc = 1;
}
}
if (rc)
goto retry;
Expand Down

0 comments on commit 8fa56ae

Please sign in to comment.