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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Feb 2023 10:53:18 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Qi Zheng <zhengqi.arch@...edance.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: page_alloc: call panic() when memoryless node
 allocation fails

On Sun, 12 Feb 2023 19:10:27 +0800 Qi Zheng <zhengqi.arch@...edance.com> wrote:

> In free_area_init(), we will continue to run after pgdat of memoryless
> node allocation fails. However, in the subsequent process (such as when
> initializing zonelist), the case that NODE_DATA(nid) is NULL is not
> handled, which will cause panic. Instead of this, it's better to call
> panic() directly when the memory allocation fails during system boot.
> 
> ...
>
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -8360,11 +8360,9 @@ void __init free_area_init(unsigned long *max_zone_pfn)
>  
>  			/* Allocator not initialized yet */
>  			pgdat = arch_alloc_nodedata(nid);
> -			if (!pgdat) {
> -				pr_err("Cannot allocate %zuB for node %d.\n",
> -						sizeof(*pgdat), nid);
> -				continue;
> -			}
> +			if (!pgdat)
> +				panic("Cannot allocate %zuB for node %d.\n",
> +				       sizeof(*pgdat), nid);
>  			arch_refresh_nodedata(nid, pgdat);
>  			free_area_init_memoryless_node(nid);

Have you actually hit this at runtime?  If so, is there something we
can do to handle this failure more gracefully?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ