All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] cxl:Plug irq_bitmap getting leaked in cxl_context
@ 2015-08-14  6:58 Vaibhav Jain
  2015-08-17  8:03 ` [RESEND] " Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Vaibhav Jain @ 2015-08-14  6:58 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Matthew R. Ochs, Benjamin Herrenschmidt, mikey, imunsie,
	Michael Ellerman, Vaibhav Jain

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>
---
 drivers/misc/cxl/irq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
index 680cd26..c8f1f9d 100644
--- a/drivers/misc/cxl/irq.c
+++ b/drivers/misc/cxl/irq.c
@@ -511,4 +511,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;
 }
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESEND] cxl:Plug irq_bitmap getting leaked in cxl_context
  2015-08-14  6:58 [PATCH][RESEND] cxl:Plug irq_bitmap getting leaked in cxl_context Vaibhav Jain
@ 2015-08-17  8:03 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2015-08-17  8:03 UTC (permalink / raw)
  To: Vaibhav Jain, linuxppc-dev; +Cc: mikey, Matthew R. Ochs, Vaibhav Jain, imunsie

On Fri, 2015-14-08 at 06:58:38 UTC, Vaibhav Jain wrote:
> 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>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8c7dd08a8ccac3f0f3df

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-17  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14  6:58 [PATCH][RESEND] cxl:Plug irq_bitmap getting leaked in cxl_context Vaibhav Jain
2015-08-17  8:03 ` [RESEND] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.