linux_dsm_epyc7002/arch/x86/boot/compressed
Matt Fleming 30dc0d0fe5 x86, efi: Only close open files in error path
The loop at the 'close_handles' label in handle_ramdisks() should be
using 'i', which represents the number of initrd files that were
successfully opened, not 'nr_initrds' which is the number of initrd=
arguments passed on the command line.

Currently, if we execute the loop to close all file handles and we
failed to open any initrds we'll try to call the close function on a
garbage pointer, causing the machine to hang.

Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1331907517-3985-2-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-06-01 09:11:10 -07:00
..
.gitignore x86, boot: add new generated files to the appropriate .gitignore files 2009-06-02 21:13:30 -07:00
cmdline.c x86, setup: enable early console output from the decompressor 2010-08-02 20:32:20 -07:00
early_serial_console.c x86, setup: enable early console output from the decompressor 2010-08-02 20:32:20 -07:00
eboot.c x86, efi: Only close open files in error path 2012-06-01 09:11:10 -07:00
eboot.h x86, efi: Break up large initrd reads 2011-12-16 08:34:35 -08:00
efi_stub_32.S x86, efi: EFI boot stub support 2011-12-12 14:26:10 -08:00
efi_stub_64.S x86, efi: EFI boot stub support 2011-12-12 14:26:10 -08:00
head_32.S x86, efi: Add dedicated EFI stub entry point 2012-04-16 11:41:44 -07:00
head_64.S x86, efi: Add dedicated EFI stub entry point 2012-04-16 11:41:44 -07:00
Makefile x86, realmode: 16-bit real-mode code support for relocs tool 2012-05-18 19:49:40 -07:00
misc.c x86/boot-image: Don't leak phdrs in arch/x86/boot/compressed/misc.c::Parse_elf() 2012-01-26 11:30:29 +01:00
misc.h x86, setup: move isdigit.h to ctype.h, header files on top. 2010-08-02 21:07:20 -07:00
mkpiggy.c x86, mkpiggy: Don't open code put_unaligned_le32() 2012-02-28 10:22:57 -08:00
string.c x86, efi: EFI boot stub support 2011-12-12 14:26:10 -08:00
vmlinux.lds.S x86, setup: Allow global variables and functions in the decompressor 2010-08-02 15:34:44 -07:00