arm64: To remove initrd reserved area entry from memblock
INITRD reserved area entry is not removed from memblock even though initrd reserved area is freed. After freeing the memory it is released from memblock. The same can be checked from /sys/kernel/debug/memblock/reserved. The patch makes sure that the initrd entry is removed from memblock when keepinitrd is not enabled. The patch only affects accounting and debugging. This does not fix any memory leak. Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: CHANDAN VN <chandan.vn@samsung.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
6da6c0db53
commit
05c58752f9
|
@ -646,8 +646,10 @@ static int keep_initrd __initdata;
|
|||
|
||||
void __init free_initrd_mem(unsigned long start, unsigned long end)
|
||||
{
|
||||
if (!keep_initrd)
|
||||
if (!keep_initrd) {
|
||||
free_reserved_area((void *)start, (void *)end, 0, "initrd");
|
||||
memblock_free(__virt_to_phys(start), end - start);
|
||||
}
|
||||
}
|
||||
|
||||
static int __init keepinitrd_setup(char *__unused)
|
||||
|
|
Loading…
Reference in New Issue