summaryrefslogtreecommitdiffstats
path: root/debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:58:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:59:34 +0000
commitb306a14ab81a53f568663c93f8d4cc22996f35fa (patch)
tree6f4798ef73b8b0828fdada2f35a0be1d7e5681f5 /debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch
parentMerging upstream version 6.1.82. (diff)
downloadlinux-b306a14ab81a53f568663c93f8d4cc22996f35fa.tar.xz
linux-b306a14ab81a53f568663c93f8d4cc22996f35fa.zip
Merging debian version 6.1.82-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch')
-rw-r--r--debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch b/debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch
new file mode 100644
index 000000000..009af084b
--- /dev/null
+++ b/debian/patches/bugfix/all/efi-fix-panic-in-kdump-kernel.patch
@@ -0,0 +1,34 @@
+From: Oleksandr Tymoshenko <ovt@google.com>
+Date: Sat, 23 Mar 2024 06:33:33 +0000
+Subject: efi: fix panic in kdump kernel
+Origin: https://git.kernel.org/linus/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>
+---
+ drivers/firmware/efi/efi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
+index 8859fb0b006d..fdf07dd6f459 100644
+--- a/drivers/firmware/efi/efi.c
++++ b/drivers/firmware/efi/efi.c
+@@ -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;
+--
+2.43.0
+