Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362694
b: refs/heads/master
c: 7791c84
h: refs/heads/master
v: v3
  • Loading branch information
Richard Weinberger authored and Matt Fleming committed Apr 11, 2013
1 parent e833469 commit 8ec390e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6e4d5a03e9e3587e88aba687d8f225f4f04c792
refs/heads/master: 7791c8423f1f7f4dad94e753bae67461d5b80be8
7 changes: 6 additions & 1 deletion trunk/arch/x86/platform/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,12 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size)
if (status != EFI_SUCCESS)
return status;

if (!storage_size || size > remaining_size || size > max_size ||
if (!max_size && remaining_size > size)
printk_once(KERN_ERR FW_BUG "Broken EFI implementation"
" is returning MaxVariableSize=0\n");

if (!storage_size || size > remaining_size ||
(max_size && size > max_size) ||
(remaining_size - size) < (storage_size / 2))
return EFI_OUT_OF_RESOURCES;

Expand Down

0 comments on commit 8ec390e

Please sign in to comment.