OSDN Git Service

block: use blk_free_flush_queue() to free hctx->fq in blk_mq_init_hctx
authorShenghui Wang <shhuiw@foxmail.com>
Mon, 1 Apr 2019 13:40:36 +0000 (21:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:21:49 +0000 (07:21 +0200)
commite5be04ee17665571106a95732f28174f3df493ee
treebedf55304b193de301d1a3fa63f01ed51c0305b4
parent177edf25706ad17c190c9a0d276e6c063259ae5b
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>
block/blk-mq.c