diff options
author | Seiji Aguchi <seiji.aguchi@hds.com> | 2012-11-14 15:25:37 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2012-11-26 19:01:46 -0500 |
commit | d80a361d779a9f19498943d1ca84243209cd5647 (patch) | |
tree | 7d142c3dd3b12f5d77aa9c105482bd2a1a9e354d /include/linux | |
parent | 9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff) |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/efi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 8670eb1eb8cd..c47ec36f3f39 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -643,6 +643,7 @@ struct efivar_operations { | |||
643 | efi_get_variable_t *get_variable; | 643 | efi_get_variable_t *get_variable; |
644 | efi_get_next_variable_t *get_next_variable; | 644 | efi_get_next_variable_t *get_next_variable; |
645 | efi_set_variable_t *set_variable; | 645 | efi_set_variable_t *set_variable; |
646 | efi_query_variable_info_t *query_variable_info; | ||
646 | }; | 647 | }; |
647 | 648 | ||
648 | struct efivars { | 649 | struct efivars { |