From: Lubomir Rintel <lkundrak@v3.sk>
To: Aditya Pakki <pakki001@umn.edu>
Cc: kjlu@umn.edu, Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Juergen Gross <jgross@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Mike Rapoport <rppt@linux.ibm.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Allison Randal <allison@lohutok.net>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/platform/olpc: Fix the error handling of memblock_alloc failure
Date: Wed, 22 Jan 2020 08:42:15 +0100 [thread overview]
Message-ID: <20200122074215.GA178804@furthur.local> (raw)
In-Reply-To: <20200121232818.28018-1-pakki001@umn.edu>
On Tue, Jan 21, 2020 at 05:28:16PM -0600, Aditya Pakki wrote:
> In case of an error in memblock_alloc, the code calls both panic and
> BUG_ON. Revert the error handling to BUG_ON.
>
> Fixes: 8a7f97b902f4 (add checks for the return value of memblock_alloc*())
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
Thank you
Lubo
> ---
> arch/x86/platform/olpc/olpc_dt.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c
> index 26d1f6693789..92d5ce1232ab 100644
> --- a/arch/x86/platform/olpc/olpc_dt.c
> +++ b/arch/x86/platform/olpc/olpc_dt.c
> @@ -137,9 +137,6 @@ void * __init prom_early_alloc(unsigned long size)
> * wasted bootmem) and hand off chunks of it to callers.
> */
> res = memblock_alloc(chunk_size, SMP_CACHE_BYTES);
> - if (!res)
> - panic("%s: Failed to allocate %zu bytes\n", __func__,
> - chunk_size);
> BUG_ON(!res);
> prom_early_allocated += chunk_size;
> memset(res, 0, chunk_size);
> --
> 2.20.1
>
prev parent reply other threads:[~2020-01-22 7:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 23:28 [PATCH] x86/platform/olpc: Fix the error handling of memblock_alloc failure Aditya Pakki
2020-01-22 7:42 ` Lubomir Rintel [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=20200122074215.GA178804@furthur.local \
--to=lkundrak@v3.sk \
--cc=akpm@linux-foundation.org \
--cc=allison@lohutok.net \
--cc=andy@infradead.org \
--cc=bp@alien8.de \
--cc=dvhart@infradead.org \
--cc=geert@linux-m68k.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pakki001@umn.edu \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rppt@linux.ibm.com \
--cc=sebastian.reichel@collabora.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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