lkml.org 
[lkml]   [2014]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 1/3] blk-mq: fix leak of hctx->ctx_map
Date
hctx->ctx_map should have been freed inside blk_mq_free_queue().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
block/blk-mq.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 62082c5..dad22a9 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);
--
1.7.9.5


\
 
 \ /
  Last update: 2014-05-27 18:21    [W:0.038 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site