Skip to content

Commit b9a1ff5

Browse files
shhuiwaxboe
authored andcommitted
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>
1 parent 42b1bd3 commit b9a1ff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ static int blk_mq_init_hctx(struct request_queue *q,
23322332
return 0;
23332333

23342334
free_fq:
2335-
kfree(hctx->fq);
2335+
blk_free_flush_queue(hctx->fq);
23362336
exit_hctx:
23372337
if (set->ops->exit_hctx)
23382338
set->ops->exit_hctx(hctx, hctx_idx);

0 commit comments

Comments
 (0)