summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorShenghui Wang <shhuiw@foxmail.com>2019-04-01 21:40:36 +0800
committerJens Axboe <axboe@kernel.dk>2019-04-02 08:20:06 -0600
commitb9a1ff504b9492ad6beb7d5606e0e3365d4d8499 (patch)
treefe67ce2d34f93cddbebcd8b4abd4b0df15f1d808 /block/blk-mq.c
parent42b1bd33dcdef4ffd98f695e188bab82f9fa46d8 (diff)
block: use blk_free_flush_queue() to free hctx->fq in blk_mq_init_hctx
kfree() can leak the hctx->fq->flush_rq field. Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 3ff3d7b49969..f3b0d33bdf88 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2332,7 +2332,7 @@ static int blk_mq_init_hctx(struct request_queue *q,
return 0;
free_fq:
- kfree(hctx->fq);
+ blk_free_flush_queue(hctx->fq);
exit_hctx:
if (set->ops->exit_hctx)
set->ops->exit_hctx(hctx, hctx_idx);