]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
efi/efivars: Set generic ops before loading SSDT
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Mon, 23 Nov 2020 17:28:17 +0000 (12:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Dec 2020 07:51:58 +0000 (08:51 +0100)
[ Upstream commit 50bdcf047503e30126327d0be4f0ad7337106d68 ]

Efivars allows for overriding of SSDT tables, however starting with
commit

  bf67fad19e493b ("efi: Use more granular check for availability for variable services")

this use case is broken. When loading SSDT generic ops should be set
first, however mentioned commit reversed order of operations. Fix this
by restoring original order of operations.

Fixes: bf67fad19e493b ("efi: Use more granular check for availability for variable services")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20201123172817.124146-1-amadeuszx.slawinski@linux.intel.com
Tested-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/efi/efi.c

index 3aa07c3b5136979d8bcff667dae07cdb12265a14..8ead4379e6e858b9828b6ef7b1141604a22f1684 100644 (file)
@@ -387,10 +387,10 @@ static int __init efisubsys_init(void)
 
        if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
                                      EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
-               efivar_ssdt_load();
                error = generic_ops_register();
                if (error)
                        goto err_put;
+               efivar_ssdt_load();
                platform_device_register_simple("efivars", 0, NULL, 0);
        }