[PATCH 1/2] arm: Cleanup sanity_check_meminfo
Nicolas Pitre
nicolas.pitre at linaro.org
Tue Jan 3 17:12:42 PST 2017
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
More information about the linux-arm-kernel
mailing list