commit d82c0d12 upstream.
Reorder the operations in decompress_kernel() to ensure initrd is moved
to a safe location before the bss section is zeroed.
During decompression bss can overlap with the initrd and this can
corrupt the initrd contents depending on the size of the compressed
kernel (which affects where the initrd is placed by the bootloader) and
the size of the bss section of the decompressor.
Also use the correct initrd size when checking for overlaps with
Fixes: 06c0dd72 ([S390] fix boot failures with compressed kernels)
Reviewed-by: Joy Latten <firstname.lastname@example.org>
Reviewed-by: Vineetha HariPai <email@example.com>
Signed-off-by: Marcelo Henrique Cerri <firstname.lastname@example.org>
Signed-off-by: Heiko Carstens <email@example.com>
Signed-off-by: Martin Schwidefsky <firstname.lastname@example.org>
Signed-off-by: Greg Kroah-Hartman <email@example.com>