All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Plug memory leak in sparse irq
@ 2010-09-28 18:57 Thomas Gleixner
       [not found] ` <AANLkTi=940qOigieOHd_cBcocBAb4AtYnm2v60i9CSmp@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2010-09-28 18:57 UTC (permalink / raw)
  To: LKML; +Cc: x86, Yinghai Lu

free_irq_cfg() is not freeing the cpumask_vars in irq_cfg.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
---
 arch/x86/kernel/apic/io_apic.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -311,9 +311,11 @@ void arch_init_copy_chip_data(struct irq
 	init_copy_irq_2_pin(old_cfg, cfg, node);
 }
 
-static void free_irq_cfg(struct irq_cfg *old_cfg)
+static void free_irq_cfg(struct irq_cfg *cfg)
 {
-	kfree(old_cfg);
+	free_cpumask_var(cfg->domain);
+	free_cpumask_var(cfg->old_domain);
+	kfree(cfg);
 }
 
 void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc)

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

end of thread, other threads:[~2010-09-28 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 18:57 [PATCH] x86: Plug memory leak in sparse irq Thomas Gleixner
     [not found] ` <AANLkTi=940qOigieOHd_cBcocBAb4AtYnm2v60i9CSmp@mail.gmail.com>
2010-09-28 21:30   ` Fwd: " Yinghai Lu
2010-09-28 21:35     ` Thomas Gleixner

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.