]> rtime.felk.cvut.cz Git - linux-imx.git/commit
x86, irq: Plug memory leak in sparse irq
authorThomas Gleixner <tglx@linutronix.de>
Tue, 28 Sep 2010 18:57:19 +0000 (20:57 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:21 +0000 (21:51 -0700)
commit6af2c5f5ab721df7e7b36b939fa11591264ade32
tree975d11baf0fd44951507cebdd35ac7674d8219ca
parent8268a8d756bd63b9f68ee6fbe9cad0548134b2ca
x86, irq: Plug memory leak in sparse irq

commit 1cf180c94e9166cda083ff65333883ab3648e852 upstream.

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>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/apic/io_apic.c