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]
Message-ID: <alpine.DEB.2.00.1005171108070.20764@router.home>
Date:	Mon, 17 May 2010 11:09:31 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Haicheng Li <haicheng.li@...ux.intel.com>
cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Wu, Fengguang" <fengguang.wu@...el.com>,
	Andi Kleen <andi@...stfloor.org>, Mel Gorman <mel@....ul.ie>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 3/3] mem-hotplug: fix potential race while building
 zonelist for new populated zone

On Mon, 17 May 2010, Haicheng Li wrote:

> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 72c1211..0729a82 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2783,6 +2783,20 @@ static __init_refok int __build_all_zonelists(void
> *data)
>  {
>  	int nid;
>  	int cpu;
> +#ifdef CONFIG_MEMORY_HOTPLUG
> +	struct zone_online_info *new = (struct zone_online_info *)data;
> +
> +	/*
> +	 * Populate the new zone before build zonelists, which could
> +	 * happen only when onlining a new node after system is booted.
> +	 */
> +	if (new) {
> +		/* We are expecting a new memory block here. */
> +		WARN_ON(!new->onlined_pages);
> +		new->zone->present_pages += new->onlined_pages;
> +		new->zone->zone_pgdat->node_present_pages +=
> new->onlined_pages;
> +	}
> +#endif


Building a zonelist now has the potential side effect of changes to the
size of the zone?

Can we have a global mutex that protects against size modification of
zonelists instead? And it could also serialize the pageset setup?



--
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