linux/arch/mips
Markos Chandras ab6c15bc66 MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region
Previously, the lower limit for the MIPS SC initialization loop was
set incorrectly allowing one extra loop leading to writes
beyond the MSC ioremap'd space. More precisely, the value of the 'imp'
in the last loop increased beyond the msc_irqmap_t boundaries and
as a result of which, the 'n' variable was loaded with an incorrect
value. This value was used later on to calculate the offset in the
MSC01_IC_SUP which led to random crashes like the following one:

CPU 0 Unable to handle kernel paging request at virtual address e75c0200,
epc == 8058dba4, ra == 8058db90
[...]
Call Trace:
[<8058dba4>] init_msc_irqs+0x104/0x154
[<8058b5bc>] arch_init_irq+0xd8/0x154
[<805897b0>] start_kernel+0x220/0x36c

Kernel panic - not syncing: Attempted to kill the idle task!

This patch fixes the problem

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cc: stable@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7118/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-06-26 10:48:23 +01:00
..
alchemy MIPS: Replace obsolete strict_strto call with kstrto 2014-06-04 22:50:40 +02:00
ar7 MIPS: Restore init.h usage to arch/mips/ar7/time.c 2014-03-26 23:09:23 +01:00
ath79 usb: host: remove selects of USB_ARCH_HAS_?HCI 2014-02-18 12:36:38 -08:00
bcm47xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
bcm63xx MIPS: Use current_cpu_type() instead of c->cputype 2014-03-31 18:17:12 +02:00
boot mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
cavium-octeon Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
cobalt MIPS: Cobalt: Move to 8250/16550 serial early printk driver 2013-10-29 21:24:38 +01:00
configs Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
dec Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
emma MIPS: Remove panic_timeout settings 2013-11-26 12:12:27 +01:00
fw MIPS: DEC/SNI: O32 wrapper stack switching fixes 2014-05-13 00:29:35 +02:00
include MIPS: uasm: Add SLT uasm instruction 2014-06-26 10:48:19 +01:00
jazz
jz4740 ASoC: qi_lb60: Use GPIO descriptor API 2014-04-23 12:18:36 +01:00
kernel MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region 2014-06-26 10:48:23 +01:00
kvm MIPS: KVM: Remove redundant semicolon 2014-05-30 13:05:59 +02:00
lantiq Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
lasat MIPS: Lasat: Replace del_timer by del_timer_sync 2014-03-31 18:17:12 +02:00
lib MIPS: __delay ABI-dependent subtraction simplification 2014-05-30 21:01:08 +02:00
loongson Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
loongson1 MIPS: Disable MIPS16/microMIPS crap for platforms not supporting these ASEs. 2014-05-23 15:12:37 +02:00
math-emu MIPS: math-emu: Reduce code duplication. 2014-06-26 10:47:55 +01:00
mm MIPS: mm: uasm: Fix lh micro-assembler instruction 2014-06-26 10:48:19 +01:00
mti-malta Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
mti-sead3 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
net MIPS: bpf: Fix stack space allocation for BPF memwords on MIPS64 2014-06-26 10:48:23 +01:00
netlogic Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
oprofile MIPS: Add support for the M5150 processor 2014-03-26 23:09:22 +01:00
paravirt mips: Update the email address of Geert Uytterhoeven 2014-06-02 16:34:41 +02:00
pci Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
pmcs-msp71xx MIPS: MT: Remove SMTC support 2014-05-24 00:07:01 +02:00
pnx833x MIPS: PNX833x: Remove checks for CONFIG_I2C_PNX0105 2014-05-23 15:12:39 +02:00
power MIPS: Hibernate: Flush TLB entries in swsusp_arch_resume() 2014-03-31 10:16:53 +02:00
ralink DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
rb532
sgi-ip22 MIPS: IP22/IP28: Improve GIO support 2014-06-04 22:50:42 +02:00
sgi-ip27 MIPS: SMP: Remove plat_smp_ops cpus_done method. 2014-05-27 11:06:42 +02:00
sgi-ip32
sibyte MIPS: SMP: Remove plat_smp_ops cpus_done method. 2014-05-27 11:06:42 +02:00
sni MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
txx9 MIPS: Replace calls to obsolete strict_strto call with kstrto* equivalents. 2014-06-04 22:50:41 +02:00
vr41xx
Kbuild MIPS: net: Add BPF JIT 2014-05-30 16:10:20 +02:00
Kbuild.platforms MIPS: Enable build for new system 'paravirt' 2014-06-02 12:34:20 +02:00
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
Kconfig.debug MIPS: MT: Remove SMTC support 2014-05-24 00:07:01 +02:00
Makefile Merge branch '3.15-fixes' into mips-for-linux-next 2014-06-04 22:53:02 +02:00