The patch titled Subject: init: free_initmem: poison freed init memory has been added to the -mm tree. Its filename is init-free_initmem-poison-freed-init-memory.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/init-free_initmem-poison-freed-init-memory.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/init-free_initmem-poison-freed-init-memory.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mike Rapoport <rppt@xxxxxxxxxxxxx> Subject: init: free_initmem: poison freed init memory Various architectures including x86 poison the freed init memory. Do the same in the generic free_initmem implementation and switch sparc32 architecture that is identical to the generic code over to it now. Link: http://lkml.kernel.org/r/1550515285-17446-4-git-send-email-rppt@xxxxxxxxxxxxx Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Palmer Dabbelt <palmer@xxxxxxxxxx> Cc: Richard Kuo <rkuo@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sparc/mm/init_32.c | 5 ----- init/main.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) --- a/arch/sparc/mm/init_32.c~init-free_initmem-poison-freed-init-memory +++ a/arch/sparc/mm/init_32.c @@ -294,11 +294,6 @@ void __init mem_init(void) mem_init_print_info(NULL); } -void free_initmem (void) -{ - free_initmem_default(POISON_FREE_INITMEM); -} - void sparc_flush_page_to_ram(struct page *page) { unsigned long vaddr = (unsigned long)page_address(page); --- a/init/main.c~init-free_initmem-poison-freed-init-memory +++ a/init/main.c @@ -1063,7 +1063,7 @@ static inline void mark_readonly(void) void __weak free_initmem(void) { - free_initmem_default(-1); + free_initmem_default(POISON_FREE_INITMEM); } static int __ref kernel_init(void *unused) _ Patches currently in -mm which might be from rppt@xxxxxxxxxxxxx are init-provide-a-generic-free_initmem-implementation.patch hexagon-switch-over-to-generic-free_initmem.patch init-free_initmem-poison-freed-init-memory.patch riscv-switch-over-to-generic-free_initmem.patch