Re: [PATCH] crash: Fix the type of pfn_to_pos().

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

 



----- "Ken'ichi Ohmichi" <oomichi@xxxxxxxxxxxxxxxxx> wrote:

> Hi,
> 
> pfn_to_pos() returns the position of the page header corresponding to
> the argument "pfn", and the value can be larger than "int".
> So it should be declared as "ulong".

Queued for the next release.

By the way, did you notice this by code inspection, or did you actually
see a failure with a large vmcore?  And if you did see it, what kind of error
resulted?  It appears like it would just read a bogus page descriptor, and
that could result in a few different error types.  Also, I was under the
impression that the compressed diskdump/kdump page descriptors would be located
near the beginning of the vmcore, and for one to exist beyond 4GB would be highly
unusual?

Thanks,
  Dave

> 
> 
> Thanks
> Ken'ichi Ohmichi
> 
> Signed-off-by: Ken'ichi Ohmichi <oomichi@xxxxxxxxxxxxxxxxx>
> ---
> --- a/diskdump.c	2009-08-19 15:02:16.000000000 +0900
> +++ b/diskdump.c	2009-08-19 15:03:40.000000000 +0900
> @@ -399,10 +399,10 @@ err:
>  	return FALSE;
>  }
>  
> -static int
> +static ulong
>  pfn_to_pos(ulong pfn)
>  {
> -	int desc_pos, j, valid;
> +	ulong desc_pos, j, valid;
>  	ulong p1, p2;
>  
>  	if (KDUMP_SPLIT()) {
> @@ -530,7 +530,7 @@ cache_page(physaddr_t paddr)
>  	int i, ret;
>  	int found;
>  	ulong pfn;
> -	int desc_pos;
> +	ulong desc_pos;
>  	off_t seek_offset;
>  	page_desc_t pd;
>  	const int block_size = dd->block_size;
> 
> --
> Crash-utility mailing list
> Crash-utility@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/crash-utility

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux