From: Ming Lei Date: Tue, 27 May 2014 14:34:45 +0000 (-0600) Subject: blk-mq: fix leak of hctx->ctx_map X-Git-Tag: next-20140530~59^2~14^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1f9f07e917f43af420f8cb3afc2b3fa703cea6e9;p=karo-tx-linux.git blk-mq: fix leak of hctx->ctx_map hctx->ctx_map should have been freed inside blk_mq_free_queue(). Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index 62082c5daae7..dad22a9abe49 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1846,6 +1846,7 @@ void blk_mq_free_queue(struct request_queue *q) queue_for_each_hw_ctx(q, hctx, i) { blk_mq_tag_idle(hctx); kfree(hctx->ctxs); + blk_mq_free_bitmap(&hctx->ctx_map); blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier); if (q->mq_ops->exit_hctx) q->mq_ops->exit_hctx(hctx, i);