[makedumpfile PATCH v2] Prevent data loss in last page of ELF core dumpfile

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

 



>> diff --git a/makedumpfile.c b/makedumpfile.c
>> index e69b6df..26296f1 100644
>> --- a/makedumpfile.c
>> +++ b/makedumpfile.c
>> @@ -5410,7 +5410,8 @@ create_1st_bitmap_file(void)
>>  		if (pfn_start > info->max_mapnr)
>>  			continue;
>>  		pfn_end = MIN(pfn_end, info->max_mapnr);
>> -
>> +        /* Account for last page if it has less than page_size data in it */
>> +        if (phys_end & (info->page_size-1)) ++pfn_end;
>
>Something is wrong with column alignment. Tabs instead of spaces?
>And "++pfn_end;" should be in new line.
>
>Daniel

I have no additional comments, thanks for your work.

BTW, I found the same issues in places where paddr_to_pfn() expects that
the end physical address is page-size aligned like get_max_mapnr(), 
I'll fix that as well.


Thanks,
Atsushi Kumagai




[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