]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
efi: fix panic in kdump kernel
authorOleksandr Tymoshenko <ovt@google.com>
Sat, 23 Mar 2024 06:33:33 +0000 (06:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:52 +0000 (15:28 +0200)
commit9114ba9987506bcfbb454f6e68558d68cb1abbde
tree4e727a5b126b29c38143b2532c86da6b317f5d14
parent1acbca933313aa866e39996904c9aca4d435c4cd
efi: fix panic in kdump kernel

[ Upstream commit 62b71cd73d41ddac6b1760402bbe8c4932e23531 ]

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: bad267f9e18f ("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>
drivers/firmware/efi/efi.c