1
0
Fork 0
alistair23-linux/arch/parisc
Helge Deller f9cd0c8318 parisc: Fix kernel panic in mem_init()
[ Upstream commit bf71bc16e0 ]

The Debian kernel v5.6 triggers this kernel panic:

 Kernel panic - not syncing: Bad Address (null pointer deref?)
 Bad Address (null pointer deref?): Code=26 (Data memory access rights trap) at addr 0000000000000000
 CPU: 0 PID: 0 Comm: swapper Not tainted 5.6.0-2-parisc64 #1 Debian 5.6.14-1
  IAOQ[0]: mem_init+0xb0/0x150
  IAOQ[1]: mem_init+0xb4/0x150
  RP(r2): start_kernel+0x6c8/0x1190
 Backtrace:
  [<0000000040101ab4>] start_kernel+0x6c8/0x1190
  [<0000000040108574>] start_parisc+0x158/0x1b8

on a HP-PARISC rp3440 machine with this memory layout:
 Memory Ranges:
  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
  1) Start 0x0000004040000000 End 0x00000040ffdfffff Size   3070 MB

Fix the crash by avoiding virt_to_page() and similar functions in
mem_init() until the memory zones have been fully set up.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-03 08:21:28 +02:00
..
boot parisc: Have git ignore generated real2.S and firmware.c 2019-09-12 15:50:07 +02:00
configs parisc: rename default_defconfig to defconfig 2019-07-31 16:18:18 +02:00
include parisc: Fix compiler warnings in debug_core.c 2020-01-12 12:21:44 +01:00
kernel parisc: Use proper printk format for resource_size_t 2020-02-05 21:22:46 +00:00
lib parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat 2019-08-03 08:56:57 +02:00
math-emu Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang 2019-08-10 12:45:37 -07:00
mm parisc: Fix kernel panic in mem_init() 2020-06-03 08:21:28 +02:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig parisc: Implement copy_thread_tls 2020-01-14 20:08:34 +01:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile kbuild: rebuild modules when module linker scripts are updated 2019-08-21 21:05:21 +09:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: make "make install" not depend on vmlinux 2013-11-07 22:28:06 +01:00
nm