initramfs: poison freed initrd memory

Various architectures including x86 poison the freed initrd memory.  Do
the same in the generic free_initrd_mem implementation and switch a few
more architectures that are identical to the generic code over to it now.

Signed-off-by: Christoph Hellwig <>
Acked-by: Mike Rapoport <>
Cc: Catalin Marinas <>	[arm64]
Cc: Geert Uytterhoeven <>	[m68k]
Cc: Steven Price <>
Cc: Alexander Viro <>
Cc: Guan Xuetao <>
Cc: Russell King <>
Cc: Will Deacon <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
5 files changed