Skip to content
Snippets Groups Projects
Commit 7326996c authored by Li Nan's avatar Li Nan Committed by Yongqiang Liu
Browse files

Revert "blk-mq: fix null pointer dereference in blk_mq_queue_tag_busy_ite"

hulk inclusion
category: bugfix
bugzilla: 187497, https://gitee.com/openeuler/kernel/issues/I5MT95


CVE: NA

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

This reverts commit 64ba823f.

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. 64ba823f will
make io hang for special scsi drivers(e.x. ata_piix). Revert it.

Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent b8b1d321
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment