dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/x86/kernel/apic
Dimitri Sivanich 94777fc51b x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt
Posting this patch to fix an issue concerning sparse irq's that
I raised a while back.  There was discussion about adding
refcounting to sparse irqs (to fix other potential race
conditions), but that does not appear to have been addressed
yet.  This covers the only issue of this type that I've
encountered in this area.

A NULL pointer dereference can occur in
smp_irq_move_cleanup_interrupt() if we haven't yet setup the
irq_cfg pointer in the irq_desc.irq_data.chip_data.

In create_irq_nr() there is a window where we have set
vector_irq in __assign_irq_vector(), but not yet called
irq_set_chip_data() to set the irq_cfg pointer.

Should an IRQ_MOVE_CLEANUP_VECTOR hit the cpu in question during
this time, smp_irq_move_cleanup_interrupt() will attempt to
process the aforementioned irq, but panic when accessing
irq_cfg.

Only continue processing the irq if irq_cfg is non-NULL.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Alexander Gordeev <agordeev@redhat.com>
Link: http://lkml.kernel.org/r/20121016125021.GA22935@sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-10-24 12:53:51 +02:00
..
Makefile x86: Add NumaChip support 2011-12-05 17:17:24 +01:00
apic.c arch/x86: Remove unecessary semicolons 2012-09-19 17:32:48 +02:00
apic_flat_64.c x86/apic: Eliminate cpu_mask_to_apicid() operation 2012-06-14 12:53:13 +02:00
apic_noop.c x86/apic/x2apic: Limit the vector reservation to the user specified mask 2012-07-06 11:00:22 +02:00
apic_numachip.c sections: fix section conflicts in arch/x86 2012-10-06 03:04:40 +09:00
bigsmp_32.c x86/apic: Eliminate cpu_mask_to_apicid() operation 2012-06-14 12:53:13 +02:00
es7000_32.c x86/apic/es7000: Make apicid of a cluster (not CPU) from a cpumask 2012-06-14 12:53:16 +02:00
hw_nmi.c x86, nmi: Wire up NMI handlers to new routines 2011-10-10 06:56:57 +02:00
io_apic.c x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt 2012-10-24 12:53:51 +02:00
ipi.c x86: Always use x86_cpu_to_logical_apicid for cpu -> logical apic id 2011-01-28 14:54:05 +01:00
numaq_32.c x86/apic: Eliminate cpu_mask_to_apicid() operation 2012-06-14 12:53:13 +02:00
probe_32.c Merge branch 'x86/apic' into x86/platform 2012-06-18 11:09:49 +02:00
probe_64.c x86/platform: Introduce APIC post-initialization callback 2012-06-06 09:06:19 +02:00
summit_32.c Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 12:19:36 -07:00
x2apic_cluster.c x86/apic/x2apic: Use multiple cluster members for the irq destination only with the explicit affinity 2012-07-06 11:00:23 +02:00
x2apic_phys.c x86/apic: Eliminate cpu_mask_to_apicid() operation 2012-06-14 12:53:13 +02:00
x2apic_uv_x.c x86/apic: Fix ugly casting and branching in cpu_mask_to_apicid_and() 2012-06-14 12:53:14 +02:00