Commit c4326563 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ingo Molnar

efivars: Call guid_parse() against guid_t type of variable

uuid_le_to_bin() is deprecated API and take into consideration that variable,
to where we store parsed data, is type of guid_t we switch to guid_parse()
for sake of consistency.

While here, add error checking to it.
Signed-off-by: default avatarAndy Shevchenko <>
Signed-off-by: default avatarArd Biesheuvel <>
Cc: Hans de Goede <>
Cc: Linus Torvalds <>
Cc: Lukas Wunner <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Link: default avatarIngo Molnar <>
parent e8f4194d
......@@ -86,7 +86,9 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry,
/* length of the variable name itself: remove GUID and separator */
namelen = dentry->d_name.len - EFI_VARIABLE_GUID_LEN - 1;
uuid_le_to_bin(dentry-> + namelen + 1, &var->var.VendorGuid);
err = guid_parse(dentry-> + namelen + 1, &var->var.VendorGuid);
if (err)
goto out;
if (efivar_variable_is_removable(var->var.VendorGuid,
dentry->, namelen))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment