From: Li Nan linan122@huawei.com
hulk inclusion category: bugfix bugzilla: 187497, https://gitee.com/openeuler/kernel/issues/I5MT95 CVE: NA
--------------------------------
This reverts commit 64ba823fd4272f7d624bbfb4bd6e3c89aa6f423c.
Commit fea9f92f1748 introduce the bug. It is a patch for performance optimization and this version doesn't have to backport it. blk_mq_queue_tag_busy_iter() won't access q->tag_set->flags or reference other fields in q that is uninitialized at present. 64ba823fd427 will make io hang for special scsi drivers(e.x. ata_piix). Revert it.
Signed-off-by: Li Nan linan122@huawei.com Reviewed-by: Yu Kuai yukuai3@huawei.com Reviewed-by: Jason Yan yanaijie@huawei.com Signed-off-by: Yongqiang Liu liuyongqiang13@huawei.com --- block/blk-mq-tag.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index c24802fe6ab2..bee92ab06a5e 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -374,13 +374,6 @@ void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, struct blk_mq_hw_ctx *hctx; int i;
- /* - * For dm, it can run here after register_disk, but the queue has not - * been initialized yet. Check QUEUE_FLAG_REGISTERED prevent null point - * access. - */ - if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags)) - return; /* * __blk_mq_update_nr_hw_queues will update the nr_hw_queues and * queue_hw_ctx after freeze the queue, so we use q_usage_counter