diff options
author | Vaibhav Jain <vaibhav@linux.vnet.ibm.com> | 2015-08-14 12:28:38 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-17 13:56:32 +1000 |
commit | 8c7dd08a8ccac3f0f3df6002dc8e86d3ca6c56a8 (patch) | |
tree | c935593945ee17c579354fa0f23c3b4d37fe026b /drivers/misc | |
parent | 25901632c9323e5208cca66097a0b8f34c752606 (diff) | |
download | op-kernel-dev-8c7dd08a8ccac3f0f3df6002dc8e86d3ca6c56a8.zip op-kernel-dev-8c7dd08a8ccac3f0f3df6002dc8e86d3ca6c56a8.tar.gz |
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 <mrochs@linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/cxl/irq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c index 6282378..72bf45a 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; } |