On Thu 16-01-20 11:01:08, Pingfan Liu wrote:
> When fully deactivated, it is meaningless to keep the value of a section's
> mem_map. And its mem_map will be reassigned during re-added.
> 
> Beside this, it breaks the user space tool "makedumpfile", which makes
> assumption that a hot-removed section having mem_map as NULL.

We used to do that before ba72b4c8cf60 ("mm/sparsemem: support
sub-section hotplug"). Dan was this an intentional change?
 
> The bug can be reproduced on IBM POWERVM by "drmgr -c mem -r -q 5" ,
> trigger a crash, and save vmcore by makedumpfile
> 
> Signed-off-by: Pingfan Liu <kernelf...@gmail.com>
> To: linux...@kvack.org
> Cc: Andrew Morton <a...@linux-foundation.org>
> Cc: David Hildenbrand <da...@redhat.com>
> Cc: Dan Williams <dan.j.willi...@intel.com>
> Cc: Oscar Salvador <osalva...@suse.de>
> Cc: Michal Hocko <mho...@kernel.org>
> Cc: kexec@lists.infradead.org
> Cc: Kazuhito Hagio <k-ha...@ab.jp.nec.com>
> ---
>  mm/sparse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/sparse.c b/mm/sparse.c
> index 3822ecb..fddac80 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -789,7 +789,7 @@ static void section_deactivate(unsigned long pfn, 
> unsigned long nr_pages,
>                       ms->usage = NULL;
>               }
>               memmap = sparse_decode_mem_map(ms->section_mem_map, section_nr);
> -             ms->section_mem_map = sparse_encode_mem_map(NULL, section_nr);
> +             ms->section_mem_map = NULL;
>       }
>  
>       if (section_is_early && memmap)
> -- 
> 2.7.5

-- 
Michal Hocko
SUSE Labs

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to