public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, opendmb@gmail.com,
	Barret Rhoden <brho@google.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] initramfs: Panic with memory information
Date: Sun, 17 Jan 2021 19:09:32 -0800	[thread overview]
Message-ID: <36c6065f-0680-4ac0-c480-1382aa13fcb0@gmail.com> (raw)
In-Reply-To: <20210117133355.10fe86c628279161bb3435d4@linux-foundation.org>



On 1/17/2021 1:33 PM, Andrew Morton wrote:
> On Thu, 14 Jan 2021 15:15:16 -0800 Florian Fainelli <f.fainelli@gmail.com> wrote:
> 
>> 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.
> 
> Seems sensible.
> 
>> @@ -45,6 +46,11 @@ static void __init error(char *x)
>>  		message = x;
>>  }
>>  
>> +#define panic_show_mem(...) {	\
>> +	show_mem(0, NULL);	\
>> +	panic(__VA_ARGS__);	\
>> +}
>> +
> 
> But can we replace nasty macro with pleasing C code?

That works for me, would you like to squash this into my patch before
sending this to Linus?
-- 
Florian

      reply	other threads:[~2021-01-18  3:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 23:15 [PATCH] initramfs: Panic with memory information Florian Fainelli
2021-01-17 21:33 ` Andrew Morton
2021-01-18  3:09   ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36c6065f-0680-4ac0-c480-1382aa13fcb0@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=brho@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opendmb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox