]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
efivars: Respect "block" flag in efivar_entry_set_safe()
authorJann Horn <jannh@google.com>
Fri, 18 Feb 2022 18:05:59 +0000 (19:05 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 13:17:29 +0000 (15:17 +0200)
commitbe403c1af3a5b443f77d486c9d253111d0753414
treefeca5bfd4a421f7926732a93fa63e82d076812b8
parent810e006ad560b6e49464646e597ee49e0045a016
efivars: Respect "block" flag in efivar_entry_set_safe()

BugLink: https://bugs.launchpad.net/bugs/1969239
commit 258dd902022cb10c83671176688074879517fd21 upstream.

When the "block" flag is false, the old code would sometimes still call
check_var_size(), which wrongly tells ->query_variable_store() that it can
block.

As far as I can tell, this can't really materialize as a bug at the moment,
because ->query_variable_store only does something on X86 with generic EFI,
and in that configuration we always take the efivar_entry_set_nonblocking()
path.

Fixes: ca0e30dcaa53 ("efi: Add nonblocking option to efi_query_variable_store()")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220218180559.1432559-1-jannh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/firmware/efi/vars.c