Skip to content

Commit 62b71cd

Browse files
gonzouaardbiesheuvel
authored andcommitted
efi: fix panic in kdump kernel
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: bad267f ("efi: verify that variable services are supported") Signed-off-by: Oleksandr Tymoshenko <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent df7ecce commit 62b71cd

File tree

1 file changed

+2
-0
lines changed
  • drivers/firmware/efi

1 file changed

+2
-0
lines changed

drivers/firmware/efi/efi.c

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ static bool generic_ops_supported(void)
203203

204204
name_size = sizeof(name);
205205

206+
if (!efi.get_next_variable)
207+
return false;
206208
status = efi.get_next_variable(&name_size, &name, &guid);
207209
if (status == EFI_UNSUPPORTED)
208210
return false;

0 commit comments

Comments
 (0)