]> git.baikalelectronics.ru Git - 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)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 28 Feb 2022 09:07:50 +0000 (10:07 +0100)
commit5cd04268900c81e79f9b7006e22c47e6e0812414
tree5209100eaa713d38bc5a1dc0f09214f1afef2dee
parent2313bde95ce8bfdaf353cc611b52643277d2e6cf
efivars: Respect "block" flag in efivar_entry_set_safe()

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