On 21/02/2019 12:13, Marek Szyprowski wrote:

> On 2019-02-13 21:13, a...@linux-foundation.org wrote:
> 
>> --- 
>> a/drivers/of/of_reserved_mem.c~of-fix-kmemleak-crash-caused-by-imbalance-in-early-memory-reservation
>> +++ a/drivers/of/of_reserved_mem.c
>> @@ -34,22 +34,15 @@ int __init __weak early_init_dt_alloc_re
>>  
>>      end = !end ? MEMBLOCK_ALLOC_ANYWHERE : end;
>>      align = !align ? SMP_CACHE_BYTES : align;
>> -    base = memblock_phys_alloc_range(size, align, 0, end);
>> +    base = memblock_find_in_range(size, align, start, end);
> 
> The parameters for memblock_find_in_range() are not in the correct
> order. The proper call should be:
> 
>       memblock_find_in_range(start, end, size, align)

How is it possible that calling memblock_find_in_range() with incorrect 
parameters
"fixed" the crash? o_O

Regards.

Reply via email to