diff options
author | Andrey Ryabinin <[email protected]> | 2018-01-10 18:36:02 +0300 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2018-01-15 00:32:35 +0100 |
commit | 0d39e2669d7b0fefd2d8f9e7868ae669b364d9ba (patch) | |
tree | c02373bb8b2457a2d2a46c1b1bac755d55c0302d /lib/test-string_helpers.c | |
parent | b8b9ce4b5aec8de9e23cabb0a26b78641f9ab1d6 (diff) |
x86/kasan: Panic if there is not enough memory to boot
Currently KASAN doesn't panic in case it don't have enough memory
to boot. Instead, it crashes in some random place:
kernel BUG at arch/x86/mm/physaddr.c:27!
RIP: 0010:__phys_addr+0x268/0x276
Call Trace:
kasan_populate_shadow+0x3f2/0x497
kasan_init+0x12e/0x2b2
setup_arch+0x2825/0x2a2c
start_kernel+0xc8/0x15f4
x86_64_start_reservations+0x2a/0x2c
x86_64_start_kernel+0x72/0x75
secondary_startup_64+0xa5/0xb0
Use memblock_virt_alloc_try_nid() for allocations without failure
fallback. It will panic with an out of memory message.
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Andrey Ryabinin <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Dmitry Vyukov <[email protected]>
Cc: [email protected]
Cc: Alexander Potapenko <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions