[PATCH] makedumpfile: omit those section has 0 size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lei,

Thank you for the patch.

The almost same patch has been merged into the devel git-tree,
does the following patch fix the prblem you said ?

http://makedumpfile.git.sourceforge.net/git/gitweb.cgi?p=makedumpfile/makedumpfile;a=commit;h=63f720a7784debce82c8942970d5c0d8412f209f


Thanks
Ken'ichi Ohmichi

On Sun,  4 Sep 2011 09:02:39 -0700
Lei Wen <leiwen at marvell.com> wrote:
>
> If the area reserved for the kdump is at the end of system memory, then
> it would occur such case that the second sector is turly 0 size. And as
> the beginnig of the second sector is already out of system memory range.
> Try to access this range, would cause makedumpfile failed.
> 
> Signed-off-by: Lei Wen <leiwen at marvell.com>
> ---
>  makedumpfile.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 7d0c663..3f8d9af 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -1336,6 +1336,8 @@ get_elf_info(void)
>  		}
>  		if (phdr.p_type != PT_LOAD)
>  			continue;
> +		if (phdr.p_filesz == 0)
> +			continue;
>  
>  		if (j == 0) {
>  			info->offset_load_memory = phdr.p_offset;
> @@ -5756,6 +5758,8 @@ write_elf_pages(struct cache_data *cd_header, struct cache_data *cd_page)
>  
>  		if (load.p_type != PT_LOAD)
>  			continue;
> +		if (load.p_filesz == 0)
> +			continue;
>  
>  		off_memory= load.p_offset;
>  		paddr     = load.p_paddr;
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux