mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
efi: fix panic in kdump kernel
[ Upstream commit62b71cd73d
] Check if get_next_variable() is actually valid pointer before calling it. In kdump kernel this method is set to NULL that causes panic during the kexec-ed kernel boot. Tested with QEMU and OVMF firmware. Fixes:bad267f9e1
("efi: verify that variable services are supported") Signed-off-by: Oleksandr Tymoshenko <ovt@google.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b61e3b7055
commit
090d2b4515
1 changed files with 2 additions and 0 deletions
|
@ -203,6 +203,8 @@ static bool generic_ops_supported(void)
|
|||
|
||||
name_size = sizeof(name);
|
||||
|
||||
if (!efi.get_next_variable)
|
||||
return false;
|
||||
status = efi.get_next_variable(&name_size, &name, &guid);
|
||||
if (status == EFI_UNSUPPORTED)
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue