summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorShenghui Wang <shhuiw@foxmail.com>2019-04-01 21:40:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-08 07:21:49 +0200
commite5be04ee17665571106a95732f28174f3df493ee (patch)
treebedf55304b193de301d1a3fa63f01ed51c0305b4 /block
parent177edf25706ad17c190c9a0d276e6c063259ae5b (diff)
downloadlinux-stable-e5be04ee17665571106a95732f28174f3df493ee.tar.gz
linux-stable-e5be04ee17665571106a95732f28174f3df493ee.tar.bz2
linux-stable-e5be04ee17665571106a95732f28174f3df493ee.zip
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: Ming Lei <ming.lei@redhat.com> Signed-off-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
-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 7d53f2314d7c..414656796ecf 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2236,7 +2236,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);