Injecting a fake block timeout error when the queue is QUIESCED, a hang can occur. The fix is to ingnore the request to fake a timeout id the queue is QUIESCED. Signed-off-by: Alan Adamson <alan.adamson@xxxxxxxxxx> Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> --- block/blk-timeout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 8aa68fae96ad..482a777295ba 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -22,10 +22,10 @@ static int __init setup_fail_io_timeout(char *str) int blk_should_fake_timeout(struct request_queue *q) { - if (!test_bit(QUEUE_FLAG_FAIL_IO, &q->queue_flags)) - return 0; - - return should_fail(&fail_io_timeout, 1); + if (test_bit(QUEUE_FLAG_FAIL_IO, &q->queue_flags) && + !blk_queue_quiesced(q)) + return should_fail(&fail_io_timeout, 1); + return 0; } static int __init fail_io_timeout_debugfs(void) -- 1.8.3.1