diff options
author | 2013-04-29 20:08:02 +0100 | |
---|---|---|
committer | 2013-04-30 16:03:10 +0100 | |
commit | 8a415b8c05f261a52f45f2271b6c4731376fd5b5 (patch) | |
tree | de233c9382c3f4a08fcdd1b26be38810fdf2ce25 /include/linux/efi.h | |
parent | efi, pstore: Remove entry from list when erasing (diff) | |
download | linux-8a415b8c05f261a52f45f2271b6c4731376fd5b5.tar.gz linux-8a415b8c05f261a52f45f2271b6c4731376fd5b5.tar.bz2 linux-8a415b8c05f261a52f45f2271b6c4731376fd5b5.zip |
efi, pstore: Read data from variable store before memcpy()
Seiji reported getting empty dmesg-* files, because the data was never
actually read in efi_pstore_read_func(), and so the memcpy() was copying
garbage data.
This patch necessitated adding __efivar_entry_get() which is callable
between efivar_entry_iter_{begin,end}(). We can also delete
__efivar_entry_size() because efi_pstore_read_func() was the only
caller.
Reported-by: Seiji Aguchi <seiji.aguchi@hds.com>
Tested-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 3f7257f1f5e8..2bc0ad78d058 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -808,8 +808,9 @@ void efivar_entry_remove(struct efivar_entry *entry); int __efivar_entry_delete(struct efivar_entry *entry); int efivar_entry_delete(struct efivar_entry *entry); -int __efivar_entry_size(struct efivar_entry *entry, unsigned long *size); int efivar_entry_size(struct efivar_entry *entry, unsigned long *size); +int __efivar_entry_get(struct efivar_entry *entry, u32 *attributes, + unsigned long *size, void *data); int efivar_entry_get(struct efivar_entry *entry, u32 *attributes, unsigned long *size, void *data); int efivar_entry_set(struct efivar_entry *entry, u32 attributes, |