From: Vaibhav Jain Date: Fri, 14 Aug 2015 06:58:38 +0000 (+0530) Subject: cxl: Plug irq_bitmap getting leaked in cxl_context X-Git-Tag: firefly_0821_release~176^2~1149^2~39 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c7dd08a8ccac3f0f3df6002dc8e86d3ca6c56a8;p=firefly-linux-kernel-4.4.55.git cxl: Plug irq_bitmap getting leaked in cxl_context This patch plugs the leak of irq_bitmap, allocated as part of initialization of cxl_context struct; during the call to afu_allocate_irqs. The bitmap is now release during the call to function afu_release_irqs. Reported-by: Matthew R. Ochs Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman --- diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c index 62823784f68e..72bf45ae3806 100644 --- a/drivers/misc/cxl/irq.c +++ b/drivers/misc/cxl/irq.c @@ -520,4 +520,8 @@ void afu_release_irqs(struct cxl_context *ctx, void *cookie) afu_irq_name_free(ctx); cxl_release_irq_ranges(&ctx->irqs, ctx->afu->adapter); + + kfree(ctx->irq_bitmap); + ctx->irq_bitmap = NULL; + ctx->irq_count = 0; }