Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 057356f8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm/memblock: call kmemleak only for logically mapped region"

parents 5bc64e82 d434c03e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -690,6 +690,7 @@ int __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
		     (unsigned long long)base + size - 1,
		     (void *)_RET_IP_);

	if (base < memblock.current_limit)
		kmemleak_free_part(__va(base), size);
	return memblock_remove_range(&memblock.reserved, base, size);
}
@@ -1052,6 +1053,7 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
		 * The min_count is set to 0 so that memblock allocations are
		 * never reported as leaks.
		 */
		if (found < memblock.current_limit)
			kmemleak_alloc(__va(found), size, 0, 0);
		return found;
	}