Re: [PATCH v1] efivars: Call guid_parse() against guid_t type of variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13 July 2018 at 23:30, Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote:
> On 13 July 2018 at 15:10, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>> 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: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> Acked-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
>

Queued in efi/next

>> ---
>>  fs/efivarfs/inode.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c
>> index 71fccccf317e..8c6ab6c95727 100644
>> --- a/fs/efivarfs/inode.c
>> +++ b/fs/efivarfs/inode.c
>> @@ -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->d_name.name + namelen + 1, &var->var.VendorGuid);
>> +       err = guid_parse(dentry->d_name.name + namelen + 1, &var->var.VendorGuid);
>> +       if (err)
>> +               goto out;
>>
>>         if (efivar_variable_is_removable(var->var.VendorGuid,
>>                                          dentry->d_name.name, namelen))
>> --
>> 2.18.0
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux