summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/irq.c
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2015-12-31 17:30:44 +0100
committerThomas Gleixner <tglx@linutronix.de>2016-01-15 13:43:58 +0100
commit111abeba67e0dbdc26537429de9155e4f1d807d8 (patch)
treee286d31b727f6f13d12ea3c7625f8adde1e06fbb /arch/x86/kernel/irq.c
parentx86/irq: Call chip->irq_set_affinity in proper context (diff)
downloadlinux-111abeba67e0dbdc26537429de9155e4f1d807d8.tar.xz
linux-111abeba67e0dbdc26537429de9155e4f1d807d8.zip
x86/irq: Fix a race in x86_vector_free_irqs()
There's a race condition between x86_vector_free_irqs() { free_apic_chip_data(irq_data->chip_data); xxxxx //irq_data->chip_data has been freed, but the pointer //hasn't been reset yet irq_domain_reset_irq_data(irq_data); } and smp_irq_move_cleanup_interrupt() { raw_spin_lock(&vector_lock); data = apic_chip_data(irq_desc_get_irq_data(desc)); access data->xxxx // may access freed memory raw_spin_unlock(&desc->lock); } which may cause smp_irq_move_cleanup_interrupt() to access freed memory. Call irq_domain_reset_irq_data(), which clears the pointer with vector lock held. [ tglx: Free memory outside of lock held region. ] Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Tested-by: Borislav Petkov <bp@alien8.de> Tested-by: Joe Lawrence <joe.lawrence@stratus.com> Cc: Jeremiah Mahler <jmmahler@gmail.com> Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/1450880014-11741-3-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/irq.c')
0 files changed, 0 insertions, 0 deletions