File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2626#include <linux/serial_core.h>
2727#include <linux/sysfs.h>
2828#include <linux/random.h>
29+ #include <linux/kmemleak.h>
2930
3031#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
3132#include <asm/page.h>
@@ -522,9 +523,12 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,
522523 size = dt_mem_next_cell (dt_root_size_cells , & prop );
523524
524525 if (size &&
525- early_init_dt_reserve_memory_arch (base , size , nomap ) == 0 )
526+ early_init_dt_reserve_memory_arch (base , size , nomap ) == 0 ) {
526527 pr_debug ("Reserved memory: reserved region for node '%s': base %pa, size %lu MiB\n" ,
527528 uname , & base , (unsigned long )(size / SZ_1M ));
529+ if (!nomap )
530+ kmemleak_alloc_phys (base , size , 0 , 0 );
531+ }
528532 else
529533 pr_info ("Reserved memory: failed to reserve memory for node '%s': base %pa, size %lu MiB\n" ,
530534 uname , & base , (unsigned long )(size / SZ_1M ));
You can’t perform that action at this time.
0 commit comments