alistair23-linux/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 irqchip/armada-370-xp: Allow allocation of multiple MSIs 2016-02-16 17:36:16 +00:00
irq-ath79-cpu.c irqchip/ath79-cpu: Move the CPU IRQ driver from arch/mips/ath79/ 2016-02-17 13:47:19 +00:00
irq-ath79-misc.c irqchip/ath79-misc: Move the MISC driver from arch/mips/ath79/ 2016-02-17 13:44:31 +00:00
irq-atmel-aic-common.c irqchip/atmel-aic: Change return type of aic_common_set_priority() 2016-02-08 15:03:42 +01:00
irq-atmel-aic-common.h irqchip/atmel-aic: Change return type of aic_common_set_priority() 2016-02-08 15:03:42 +01:00
irq-atmel-aic.c irqchip/atmel-aic: Change return type of aic_common_set_priority() 2016-02-08 15:03:42 +01:00
irq-atmel-aic5.c irqchip/atmel-aic: Remove duplicate bit operation 2016-02-08 15:03:42 +01:00
irq-bcm2835.c
irq-bcm2836.c irqchip/bcm2836: Drop extra memory barrier in SMP boot. 2016-02-18 01:53:10 +00:00
irq-bcm6345-l1.c irqchips/bmips: Add bcm6345-l1 interrupt controller 2016-02-08 15:03:42 +01:00
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 irqchip/omap-intc: Add support for spurious irq handling 2016-01-06 11:35:13 +01:00
irq-or1k-pic.c
irq-orion.c
irq-pic32-evic.c IRQCHIP: irq-pic32-evic: Add support for PIC32 interrupt controller 2016-01-24 02:52:20 +01:00
irq-renesas-h8s.c irqchip: renesas-h8s: Replace ctrl_outw/ctrl_inw with writew/readw 2016-01-20 22:44:13 +09:00
irq-renesas-h8300h.c h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl] 2015-12-15 10:12:03 +01:00
irq-renesas-intc-irqpin.c irqchip/renesas-intc-irqpin: Improve clock error handling and reporting 2015-11-24 16:54:19 +00:00
irq-renesas-irqc.c
irq-s3c24xx.c irqchip/s3c24xx: Mark init_eint as __maybe_unused 2016-01-26 16:00:14 +01:00
irq-sa11x0.c
irq-sirfsoc.c
irq-st.c
irq-sun4i.c irqchip/sun4i: Fix compilation outside of arch/arm 2016-02-02 15:46:40 +01:00
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 irqchip/tango: Add support for Sigma Designs SMP86xx/SMP87xx interrupt controller 2016-02-18 01:18:14 +00:00
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 irqchip/ts4800: Make ts4800_ic_ops static const 2016-02-18 02:09:18 +00:00
irq-versatile-fpga.c irqchip/versatile-fpga: Fix PCI IRQ mapping on Versatile PB 2015-12-01 22:50:16 +01:00
irq-vf610-mscm-ir.c
irq-vic.c
irq-vt8500.c
irq-xtensa-mx.c
irq-xtensa-pic.c
irq-zevio.c irqchip/zevio: Use irq_data_get_chip_type() helper 2015-12-30 18:29:02 +01:00
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