[PATCH 1/2] arm: Cleanup sanity_check_meminfo

Laura Abbott labbott at redhat.com
Wed Jan 4 08:50:15 PST 2017


On 01/03/2017 05:12 PM, Nicolas Pitre wrote:
> On Tue, 3 Jan 2017, Laura Abbott wrote:
> 
>>
>> The logic for sanity_check_meminfo has become difficult to
>> follow. Clean up the code so it's more obvious what the code
>> is actually trying to do.
> 
> Absolutely. This function has a long history of subtle bugs ... and 
> broken fixes.
> 
>> +		if (reg->base < vmalloc_limit) {
>> +			if (block_end > arm_lowmem_limit)
>> +				arm_lowmem_limit = min(
>> +						(phys_addr_t)vmalloc_limit,
>> +						block_end);
> 
> Just to illustrate how subtle this can be, the above would reintroduce a 
> bug that was fixed in commit b9a019899f.
> 
> 
> Nicolas
> 

Yup, I saw that commit and thought "I need to keep the fix". And yet I
still managed to get it wrong. I'll fix in a v2.

Thanks,
Laura



More information about the linux-arm-kernel mailing list