提交 eb14ba73 编写于 作者: Y yu kuai 提交者: Yang Yingliang

blk-mq: use blk_mq_queue_tag_inflight_iter() in debugfs

hulk inclusion
category: bugfix
bugzilla: 34280
CVE: NA

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

blk_mq_tagset_busy_iter() is not safe that it could get stale request
in tags->rqs[]. Use blk_mq_queue_tag_inflight_iter() here.
Signed-off-by: Nyu kuai <yukuai3@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 c483f4fe
......@@ -427,7 +427,8 @@ struct show_busy_params {
* Note: the state of a request may change while this function is in progress,
* e.g. due to a concurrent blk_mq_finish_request() call.
*/
static void hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
static void hctx_show_busy_rq(struct blk_mq_hw_ctx *hctx,
struct request *rq, void *data, bool reserved)
{
const struct show_busy_params *params = data;
......@@ -442,7 +443,7 @@ static int hctx_busy_show(void *data, struct seq_file *m)
struct blk_mq_hw_ctx *hctx = data;
struct show_busy_params params = { .m = m, .hctx = hctx };
blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq,
blk_mq_queue_tag_inflight_iter(hctx->queue, hctx_show_busy_rq,
&params);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册