提交 e5be04ee 编写于 作者: S Shenghui Wang 提交者: Greg Kroah-Hartman

block: use blk_free_flush_queue() to free hctx->fq in blk_mq_init_hctx

[ Upstream commit b9a1ff504b9492ad6beb7d5606e0e3365d4d8499 ]

kfree() can leak the hctx->fq->flush_rq field.
Reviewed-by: NMing Lei <ming.lei@redhat.com>
Signed-off-by: NShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 177edf25
...@@ -2236,7 +2236,7 @@ static int blk_mq_init_hctx(struct request_queue *q, ...@@ -2236,7 +2236,7 @@ static int blk_mq_init_hctx(struct request_queue *q,
return 0; return 0;
free_fq: free_fq:
kfree(hctx->fq); blk_free_flush_queue(hctx->fq);
exit_hctx: exit_hctx:
if (set->ops->exit_hctx) if (set->ops->exit_hctx)
set->ops->exit_hctx(hctx, hctx_idx); set->ops->exit_hctx(hctx, hctx_idx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册