From: Raul E Rangel Date: Thu, 2 May 2019 19:07:14 +0000 (-0600) Subject: mmc: core: Fix tag set memory leak X-Git-Tag: v5.4-rc1~1078^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43d8dabb4074cf7f3b1404bfbaeba5aa6f3e5cfc;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Jens Axboe Acked-by: Adrian Hunter Fixes: 81196976ed94 ("mmc: block: Add blk-mq support") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson --- 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