]> git.baikalelectronics.ru Git - kernel.git/commit
initramfs: panic with memory information
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 26 Feb 2021 01:22:46 +0000 (17:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 17:41:05 +0000 (09:41 -0800)
commit75794cef19b7ce67166d8f43a5c19f55a7e48481
tree54d1cfdef6cacc7250efd48520ac5737e9aac736
parent4adb69e0a16a24cd4bd0e5a46777d20f1a23642d
initramfs: panic with memory information

On systems with large amounts of reserved memory we may fail to
successfully complete unpack_to_rootfs() and be left with:

 Kernel panic - not syncing: write error

this is not too helpful to understand what happened, so let's wrap the
panic() calls with a surrounding show_mem() such that we have a chance of
understanding the memory conditions leading to these allocation failures.

[akpm@linux-foundation.org: replace macro with C function]

Link: https://lkml.kernel.org/r/20210114231517.1854379-1-f.fainelli@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Barret Rhoden <brho@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/initramfs.c