Commit 3a3e097a authored by Li Nan's avatar Li Nan Committed by Zheng Zengkai
Browse files

blk-mq: fix io hang for scsi drivers that depends on timeout handling during scan

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I617GN


CVE: NA

--------------------------------

Since 8b97d51a0c9c, blk_mq_queue_tag_busy_iter() will return directly if
queue has not been registered. However, scsi_scan will issue io before
queue is registered ,and it causes io hang as some special scsi driver
(e.x. ata_piix) relied on blk_mq_timeou_work() to complete io when driver
initializing during scan.
Fix the bug by checking QUEUE_FLAG_REGISTERED upward.

Fixes: 8b97d51a0c9c ("[Huawei] blk-mq: fix null pointer dereference in blk_mq_queue_tag_busy_ite")
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0054d8bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment