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.

Signed-off-by: Mike Rapoport <>
Reviewed-by: Andrew Morton <>
Cc: Christoph Hellwig <>
Cc: Palmer Dabbelt <>
Cc: Richard Kuo <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
2 files changed