From: Seiji Aguchi Date: Wed, 14 Nov 2012 20:25:37 +0000 (+0000) Subject: efi_pstore: Check remaining space with QueryVariableInfo() before writing data X-Git-Tag: v3.2.41~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=316d0bb70f66a2682c19494f2d1fdebfa00de1ac;p=pandora-kernel.git 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 Acked-by: Mike Waychison Signed-off-by: Tony Luck Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed