aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2019-10-02 18:58:59 +0200
committerIngo Molnar <[email protected]>2019-10-07 15:24:35 +0200
commitc05f8f92b701576b615f30aac31fabdc0648649b (patch)
tree3c8171e1456b65aad77932f0673e2fb05daba827
parent6fb9367a15d1a126d222d738b2702c7958594a5f (diff)
efivar/ssdt: Don't iterate over EFI vars if no SSDT override was specified
The kernel command line option efivar_ssdt= allows the name to be specified of an EFI variable containing an ACPI SSDT table that should be loaded into memory by the OS, and treated as if it was provided by the firmware. Currently, that code will always iterate over the EFI variables and compare each name with the provided name, even if the command line option wasn't set to begin with. So bail early when no variable name was provided. This works around a boot regression on the 2012 Mac Pro, as reported by Scott. Tested-by: Scott Talbert <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Cc: <[email protected]> # v4.9+ Cc: Ben Dooks <[email protected]> Cc: Dave Young <[email protected]> Cc: Jarkko Sakkinen <[email protected]> Cc: Jerry Snitselaar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Octavian Purdila <[email protected]> Cc: Peter Jones <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables") Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--drivers/firmware/efi/efi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 8d3e778e988b..69f00f7453a3 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -267,6 +267,9 @@ static __init int efivar_ssdt_load(void)
void *data;
int ret;
+ if (!efivar_ssdt[0])
+ return 0;
+
ret = efivar_init(efivar_ssdt_iter, &entries, true, &entries);
list_for_each_entry_safe(entry, aux, &entries, list) {