summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSeiji Aguchi <seiji.aguchi@hds.com>2012-11-14 20:25:37 +0000
committerBen Hutchings <ben@decadent.org.uk>2013-03-20 15:03:27 +0000
commit316d0bb70f66a2682c19494f2d1fdebfa00de1ac (patch)
treeab22d352664c4f4154ea4e4ed383eda89052c993 /include
parent689901ce9cedd2d34a5404dda146d0604cbc2a5e (diff)
downloadlinux-stable-316d0bb70f66a2682c19494f2d1fdebfa00de1ac.tar.gz
linux-stable-316d0bb70f66a2682c19494f2d1fdebfa00de1ac.tar.bz2
linux-stable-316d0bb70f66a2682c19494f2d1fdebfa00de1ac.zip
efi_pstore: Check remaining space with QueryVariableInfo() before writing data
commit d80a361d779a9f19498943d1ca84243209cd5647 upstream. [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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 1721c419c0e7..b94382fce00c 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -470,6 +470,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 {