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:	Thu, 27 Sep 2012 13:02:05 +0200
From:	Vasilis Liaskovitis <vasilis.liaskovitis@...fitbricks.com>
To:	Wen Congyang <wency@...fujitsu.com>
Cc:	x86@...nel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, linux-acpi@...r.kernel.org,
	linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
	linux-ia64@...r.kernel.org, cmetcalf@...era.com,
	sparclinux@...r.kernel.org, rientjes@...gle.com, liuj97@...il.com,
	len.brown@...el.com, benh@...nel.crashing.org, paulus@...ba.org,
	cl@...ux.com, minchan.kim@...il.com, akpm@...ux-foundation.org,
	kosaki.motohiro@...fujitsu.com, isimatu.yasuaki@...fujitsu.com
Subject: Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

On Thu, Sep 27, 2012 at 06:06:30PM +0800, Wen Congyang wrote:
> Please try the following patch:
> From a38ec678e0a9b48b252f457d7910b7527049dc43 Mon Sep 17 00:00:00 2001
> From: Wen Congyang <wency@...fujitsu.com>
> Date: Thu, 27 Sep 2012 17:27:57 +0800
> Subject: [PATCH] clear the memory to store page information

this solves the hot re-add problem for me.
thanks for the quick solution.

- Vasilis

> 
> ---
>  mm/sparse.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/sparse.c b/mm/sparse.c
> index ab9d755..36dda08 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -639,7 +639,6 @@ static struct page *__kmalloc_section_memmap(unsigned long nr_pages)
>  got_map_page:
>  	ret = (struct page *)pfn_to_kaddr(page_to_pfn(page));
>  got_map_ptr:
> -	memset(ret, 0, memmap_size);
>  
>  	return ret;
>  }
> @@ -761,6 +760,8 @@ int __meminit sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
>  		goto out;
>  	}
>  
> +	memset(memmap, 0, sizeof(struct page) * nr_pages);
> +
>  	ms->section_mem_map |= SECTION_MARKED_PRESENT;
>  
>  	ret = sparse_init_one_section(ms, section_nr, memmap, usemap);
> -- 
> 1.7.1
> 
> Thanks
> Wen Congyang
> 
> > 
> > thanks,
> > 
> > - Vasilis
> > 
> > [1] https://lkml.org/lkml/2012/9/6/635
> > [2] https://lkml.org/lkml/2012/9/11/542
> > [3] https://lkml.org/lkml/2012/9/20/37
> > [4] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/98691
> > 
> > 
> > 
> 
--
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