alistair23-linux/arch/x86
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
..
boot x86, boot: Explicitly include autoconf.h for hostprogs 2012-10-14 12:41:28 -07:00
configs
crypto crypto: aesni - fix XTS mode on x86-32, add wrapper function for asmlinkage aesni_enc() 2012-10-18 14:01:33 -07:00
ia32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-10-10 12:02:25 +09:00
include x86/efi: Fix oops caused by incorrect set_memory_uc() usage 2012-10-24 12:48:47 +02:00
kernel x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt 2012-10-24 12:53:51 +02:00
kvm KVM: apic: fix LDR calculation in x2apic mode 2012-10-22 18:03:27 +02:00
lguest virtio: remove CONFIG_VIRTIO_RING 2012-09-28 15:05:15 +09:30
lib UAPI: x86: Fix insn_sanity build failure after UAPI split 2012-10-02 18:01:56 +01:00
math-emu
mm x86-64: Fix page table accounting 2012-10-24 10:50:25 +02:00
net x86: bpf_jit_comp: add XOR instruction for BPF JIT 2012-09-24 16:54:35 -04:00
oprofile oprofile, x86: Fix wrapping bug in op_x86_get_ctrl() 2012-10-15 14:38:24 +02:00
pci PCI changes for the 3.7 merge window: 2012-10-01 12:05:36 -07:00
platform x86/efi: Fix oops caused by incorrect set_memory_uc() usage 2012-10-24 12:48:47 +02:00
power
realmode x86, suspend: Correct the restore of CR4, EFER; skip computing EFLAGS.ID 2012-10-02 08:42:31 +02:00
syscalls Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-10-10 12:02:25 +09:00
tools UAPI: x86: Fix the test_get_len tool 2012-10-02 18:01:56 +01:00
um Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
vdso time: Convert x86_64 to using new update_vsyscall 2012-09-24 12:38:09 -04:00
video
xen Merge commit 'v3.7-rc1' into stable/for-linus-3.7 2012-10-19 15:19:19 -04:00
.gitignore
Kbuild
Kconfig Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
Kconfig.cpu
Kconfig.debug
Makefile kbuild: Fix accidental revert in commit fe04ddf 2012-10-15 13:01:05 -07:00
Makefile.um
Makefile_32.cpu