lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200122074215.GA178804@furthur.local>
Date:   Wed, 22 Jan 2020 08:42:15 +0100
From:   Lubomir Rintel <lkundrak@...sk>
To:     Aditya Pakki <pakki001@....edu>
Cc:     kjlu@....edu, Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Juergen Gross <jgross@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        Allison Randal <allison@...utok.net>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/platform/olpc: Fix the error handling of
 memblock_alloc failure

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@....edu>

Reviewed-by: Lubomir Rintel <lkundrak@...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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ