提交 09978187 编写于 作者: R Raul E Rangel 提交者: Xie XiuQi

mmc: core: Fix tag set memory leak

commit 43d8dabb4074cf7f3b1404bfbaeba5aa6f3e5cfc upstream.

The tag set is allocated in mmc_init_queue but never freed. This results
in a memory leak. This change makes sure we free the tag set when the
queue is also freed.
Signed-off-by: NRaul E Rangel <rrangel@chromium.org>
Reviewed-by: NJens Axboe <axboe@kernel.dk>
Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
Fixes: 81196976 ("mmc: block: Add blk-mq support")
Cc: stable@vger.kernel.org
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a65b0ea0
...@@ -494,6 +494,7 @@ void mmc_cleanup_queue(struct mmc_queue *mq) ...@@ -494,6 +494,7 @@ void mmc_cleanup_queue(struct mmc_queue *mq)
blk_mq_unquiesce_queue(q); blk_mq_unquiesce_queue(q);
blk_cleanup_queue(q); blk_cleanup_queue(q);
blk_mq_free_tag_set(&mq->tag_set);
/* /*
* A request can be completed before the next request, potentially * A request can be completed before the next request, potentially
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册