linux-stable/drivers/irqchip
Paul Burton 91951f980e irqchip/mips-gic: Don't overrun pcpu_masks array
Commit 2a07870511 ("irqchip/mips-gic: Use gic_vpes instead of
NR_CPUS") & commit 78930f09b9 ("irqchip/mips-gic: Clear percpu_masks
correctly when mapping") both introduce code which accesses gic_vpes
entries in the pcpu_masks array. However, this array has length NR_CPUS.
If NR_CPUS is less than gic_vpes (ie. the kernel supports use of less
CPUs than are present in the system) then we overrun the array, clobber
some other data & generally die pretty promptly.

Most notably this affects uniprocessor kernels running on any multicore
or multithreaded Malta with a GIC (ie. the vast majority of real Malta
boards).

Fix this by only accessing up to min(gic_vpes, NR_CPUS) entries in the
pcpu_masks array, preventing the array overrun.

Fixes: 2a07870511 ("irqchip/mips-gic: Use gic_vpes instead of NR_CPUS")
Fixes: 78930f09b9 ("irqchip/mips-gic: Clear percpu_masks correctly when mapping")
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/1461234714-9975-1-git-send-email-paul.burton@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-04-21 21:04:29 +02:00
..
alphascale_asm9260-icoll.h
exynos-combiner.c
irq-alpine-msi.c irqchip/irq-alpine-msi: Release the correct domain on error 2016-03-11 10:06:55 +01:00
irq-armada-370-xp.c
irq-ath79-cpu.c
irq-ath79-misc.c
irq-atmel-aic-common.c
irq-atmel-aic-common.h
irq-atmel-aic.c
irq-atmel-aic5.c
irq-bcm2835.c
irq-bcm2836.c
irq-bcm6345-l1.c
irq-bcm7038-l1.c
irq-bcm7120-l2.c
irq-brcmstb-l2.c
irq-clps711x.c
irq-crossbar.c
irq-digicolor.c
irq-dw-apb-ictl.c
irq-gic-common.c
irq-gic-common.h
irq-gic-realview.c irqchip/gic/realview: Support more RealView DCC variants 2016-03-09 09:38:05 +00:00
irq-gic-v2m.c irqchip/gic: Return IRQ_SET_MASK_OK_DONE in the set_affinity method 2016-02-19 15:42:29 +00:00
irq-gic-v3-its-pci-msi.c
irq-gic-v3-its-platform-msi.c
irq-gic-v3-its.c irqchip/gic-v3-its: Mark its_init() and its children as __init 2016-03-09 02:44:03 +00:00
irq-gic-v3.c irqchip/gic-v3: Always return IRQ_SET_MASK_OK_DONE in gic_set_affinity 2016-03-09 09:37:37 +00:00
irq-gic.c Merge branch 'linus' into irq/core, to pick up fixes 2016-03-08 12:26:07 +01:00
irq-hip04.c
irq-i8259.c
irq-imgpdc.c
irq-imx-gpcv2.c
irq-ingenic.c
irq-keystone.c
irq-mbigen.c irqchip/mbigen: Handle multiple device nodes in a mbigen module 2016-03-21 11:24:11 +01:00
irq-metag-ext.c
irq-metag.c
irq-mips-cpu.c
irq-mips-gic.c irqchip/mips-gic: Don't overrun pcpu_masks array 2016-04-21 21:04:29 +02:00
irq-mmp.c
irq-moxart.c
irq-mtk-sysirq.c
irq-mvebu-odmi.c irqchip/gic: Return IRQ_SET_MASK_OK_DONE in the set_affinity method 2016-02-19 15:42:29 +00:00
irq-mxs.c irqchip/mxs: Fix error check of of_io_request_and_map() 2016-03-10 16:03:30 +01:00
irq-nvic.c
irq-omap-intc.c
irq-or1k-pic.c
irq-orion.c
irq-pic32-evic.c
irq-renesas-h8s.c
irq-renesas-h8300h.c
irq-renesas-intc-irqpin.c
irq-renesas-irqc.c
irq-s3c24xx.c
irq-sa11x0.c
irq-sirfsoc.c
irq-st.c
irq-sun4i.c
irq-sunxi-nmi.c irqchip/sunxi-nmi: Fix error check of of_io_request_and_map() 2016-03-10 16:03:30 +01:00
irq-tango.c
irq-tb10x.c
irq-tegra.c irqchip/tegra: Switch to use irq_domain_free_irqs_common 2016-03-20 20:08:28 +01:00
irq-ts4800.c
irq-versatile-fpga.c
irq-vf610-mscm-ir.c
irq-vic.c
irq-vt8500.c
irq-xtensa-mx.c
irq-xtensa-pic.c
irq-zevio.c
irqchip.c
Kconfig irqchip/mbigen: Make CONFIG_HISILICON_IRQ_MBIGEN a hidden option 2016-03-23 12:02:29 +01:00
Makefile irqchip: Add the Alpine MSIX interrupt controller 2016-03-09 09:37:45 +00:00
spear-shirq.c