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: <5530CEBB.9030209@huawei.com>
Date:	Fri, 17 Apr 2015 17:13:31 +0800
From:	Xishi Qiu <qiuxishi@...wei.com>
To:	Xishi Qiu <qiuxishi@...wei.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
	Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	<izumi.taku@...fujitsu.com>, Tang Chen <tangchen@...fujitsu.com>,
	Gu Zheng <guz.fnst@...fujitsu.com>,
	Xiexiuqi <xiexiuqi@...wei.com>, Mel Gorman <mgorman@...e.de>,
	David Rientjes <rientjes@...gle.com>,
	Linux MM <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] memory-hotplug: fix BUG_ON in move_freepages()

> Signed-off-by: Xishi Qiu <qiuxishi@...wei.com>

> ---
>  mm/page_alloc.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ebffa0e..1a5743e 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4667,6 +4667,10 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid,
>  {
>  	unsigned long zone_start_pfn, zone_end_pfn;
>  
> +	/* When hotadd a new node, init node's zones as empty zones */
> +	if (!node_online(nid))
> +		return 0;
> +
>  	/* Get the start and end of the zone */
>  	zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
>  	zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
> @@ -4698,6 +4702,10 @@ unsigned long __meminit __absent_pages_in_range(int nid,
>  	unsigned long start_pfn, end_pfn;

I made a mistake here, should change zone_absent_pages_in_node(), sorry!
I'll send V2

>  	int i;
>  
> +	/* When hotadd a new node, init node's zones as empty zones */
> +	if (!node_online(nid))
> +		return 0;
> +
>  	for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) {
>  		start_pfn = clamp(start_pfn, range_start_pfn, range_end_pfn);
>  		end_pfn = clamp(end_pfn, range_start_pfn, range_end_pfn);
> @@ -4746,6 +4754,9 @@ static inline unsigned long __meminit zone_spanned_pages_in_node(int nid,
>  					unsigned long node_end_pfn,
>  					unsigned long *zones_size)
>  {
> +	if (!node_online(nid))
> +		return 0;
> +
>  	return zones_size[zone_type];
>  }
>  
> @@ -4755,6 +4766,9 @@ static inline unsigned long __meminit zone_absent_pages_in_node(int nid,
>  						unsigned long node_end_pfn,
>  						unsigned long *zholes_size)
>  {
> +	if (!node_online(nid))
> +		return 0;
> +
>  	if (!zholes_size)
>  		return 0;
>  



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ