summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2019-05-02 21:07:14 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2019-05-06 12:33:03 +0200
commit43d8dabb4074cf7f3b1404bfbaeba5aa6f3e5cfc (patch)
tree361fc9dbe3e6259867d8e8c897cb1b39fd4692ef /drivers/mmc
parentdt-bindings: mmc: Add support for MT8516 to mtk-sd (diff)
downloadlinux-43d8dabb4074cf7f3b1404bfbaeba5aa6f3e5cfc.tar.xz
linux-43d8dabb4074cf7f3b1404bfbaeba5aa6f3e5cfc.zip
mmc: core: Fix tag set memory leak
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: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Fixes: 81196976ed94 ("mmc: block: Add blk-mq support") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/queue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index 7c364a9c4eeb..b5b9c6142f08 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -472,6 +472,7 @@ void mmc_cleanup_queue(struct mmc_queue *mq)
blk_mq_unquiesce_queue(q);
blk_cleanup_queue(q);
+ blk_mq_free_tag_set(&mq->tag_set);
/*
* A request can be completed before the next request, potentially