linux-stable/arch
Joerg Roedel d97eb8966c x86/irq: Check for valid irq descriptor in check_irq_vectors_for_cpu_disable()
When an interrupt is migrated away from a cpu it will stay
in its vector_irq array until smp_irq_move_cleanup_interrupt
succeeded. The cfg->move_in_progress flag is cleared already
when the IPI was sent.

When the interrupt is destroyed after migration its 'struct
irq_desc' is freed and the vector_irq arrays are cleaned up.
But since cfg->move_in_progress is already 0 the references
at cpus before the last migration will not be cleared. So
this would leave a reference to an already destroyed irq
alive.

When the cpu is taken down at this point, the
check_irq_vectors_for_cpu_disable() function finds a valid irq
number in the vector_irq array, but gets NULL for its
descriptor and dereferences it, causing a kernel panic.

This has been observed on real systems at shutdown. Add a
check to check_irq_vectors_for_cpu_disable() for a valid
'struct irq_desc' to prevent this issue.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: alnovak@suse.com
Cc: joro@8bytes.org
Link: http://lkml.kernel.org/r/20150204132754.GA10078@suse.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-02-18 15:01:42 +01:00
..
alpha vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
arc arc: mm: Fix build failure 2015-01-30 10:31:14 -08:00
arm Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
arm64 Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 17:53:53 -08:00
avr32 vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
blackfin arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.h 2015-01-08 15:10:52 -08:00
c6x net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
cris vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
frv vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
hexagon Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel 2014-12-19 17:57:51 -08:00
ia64 vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
m32r vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
m68k vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
metag vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
microblaze vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
mips Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
mn10300 mm/debug_pagealloc: fix build failure on ppc and some other archs 2015-02-05 13:35:30 -08:00
nios2 nios2: fix unhandled signals 2015-02-09 09:47:05 +08:00
openrisc vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
parisc vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
powerpc Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
s390 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
score vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
sh vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
sparc mm/debug_pagealloc: fix build failure on ppc and some other archs 2015-02-05 13:35:30 -08:00
tile Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
um vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
unicore32 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
x86 x86/irq: Check for valid irq descriptor in check_irq_vectors_for_cpu_disable() 2015-02-18 15:01:42 +01:00
xtensa vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
.gitignore
Kconfig