x86, irq: Plug memory leak in sparse irq
authorThomas Gleixner <tglx@linutronix.de>
Tue, 28 Sep 2010 18:57:19 +0000 (20:57 +0200)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 30 Sep 2010 22:57:35 +0000 (15:57 -0700)
commit1cf180c94e9166cda083ff65333883ab3648e852
tree70cee3eaf3f99abf64377f19a864bb56974b3547
parentd900329e20f4476db6461752accebcf7935a8055
x86, irq: Plug memory leak in sparse irq

free_irq_cfg() is not freeing the cpumask_vars in irq_cfg. Fixing this
triggers a use after free caused by the fact that copying struct
irq_cfg is done with memcpy, which copies the pointer not the cpumask.

Fix both places.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
LKML-Reference: <alpine.LFD.2.00.1009282052570.2416@localhost6.localdomain6>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/apic/io_apic.c