efi_pstore: Check remaining space with QueryVariableInfo() before writing data
[Issue] As discussed in a thread below, Running out of space in EFI isn't a well-tested scenario. And we wouldn't expect all firmware to handle it gracefully. http://marc.info/?l=linux-kernel&m=134305325801789&w=2 On the other hand, current efi_pstore doesn't check a remaining space of storage at writing time. Therefore, efi_pstore may not work if it tries to write a large amount of data. [Patch Description] To avoid handling the situation above, this patch checks if there is a space enough to log with QueryVariableInfo() before writing data. Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Acked-by: Mike Waychison <mikew@google.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
9489e9dcae
commit
d80a361d77
2 changed files with 19 additions and 0 deletions
|
@ -643,6 +643,7 @@ struct efivar_operations {
|
|||
efi_get_variable_t *get_variable;
|
||||
efi_get_next_variable_t *get_next_variable;
|
||||
efi_set_variable_t *set_variable;
|
||||
efi_query_variable_info_t *query_variable_info;
|
||||
};
|
||||
|
||||
struct efivars {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue