]> Git Repo - linux.git/commit - include/linux/efi.h
efi: Add nonblocking option to efi_query_variable_store()
authorArd Biesheuvel <[email protected]>
Mon, 1 Feb 2016 22:06:58 +0000 (22:06 +0000)
committerIngo Molnar <[email protected]>
Wed, 3 Feb 2016 10:31:04 +0000 (11:31 +0100)
commitca0e30dcaa53a3fcb2dfdf74252d30bc40603eea
treeff97b9475eaeca4fb8007dc1ba10836fe4f21373
parentd3cac1f83c631b9fe5edaebcba49f6989bfff089
efi: Add nonblocking option to efi_query_variable_store()

The function efi_query_variable_store() may be invoked by
efivar_entry_set_nonblocking(), which itself takes care to only
call a non-blocking version of the SetVariable() runtime
wrapper. However, efi_query_variable_store() may call the
SetVariable() wrapper directly, as well as the wrapper for
QueryVariableInfo(), both of which could deadlock in the same
way we are trying to prevent by calling
efivar_entry_set_nonblocking() in the first place.

So instead, modify efi_query_variable_store() to use the
non-blocking variants of QueryVariableInfo() (and give up rather
than free up space if the available space is below
EFI_MIN_RESERVE) if invoked with the 'nonblocking' argument set
to true.

Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/platform/efi/quirks.c
drivers/firmware/efi/vars.c
include/linux/efi.h
This page took 0.058607 seconds and 4 git commands to generate.