diff options
| author | James Bottomley <[email protected]> | 2024-12-08 18:34:13 +0000 |
|---|---|---|
| committer | Ard Biesheuvel <[email protected]> | 2024-12-09 09:00:04 +0000 |
| commit | 2ab0837cb91b7de507daa145d17b3b6b2efb3abf (patch) | |
| tree | 0ae3eae0a5d4e089e1b04b2810a81cf19b9a7ab2 /drivers/platform/x86/intel/vsec.c | |
| parent | efi/zboot: Limit compression options to GZIP and ZSTD (diff) | |
| download | kernel-2ab0837cb91b7de507daa145d17b3b6b2efb3abf.tar.gz kernel-2ab0837cb91b7de507daa145d17b3b6b2efb3abf.zip | |
efivarfs: Fix error on non-existent file
When looking up a non-existent file, efivarfs returns -EINVAL if the
file does not conform to the NAME-GUID format and -ENOENT if it does.
This is caused by efivars_d_hash() returning -EINVAL if the name is not
formatted correctly. This error is returned before simple_lookup()
returns a negative dentry, and is the error value that the user sees.
Fix by removing this check. If the file does not exist, simple_lookup()
will return a negative dentry leading to -ENOENT and efivarfs_create()
already has a validity check before it creates an entry (and will
correctly return -EINVAL)
Signed-off-by: James Bottomley <[email protected]>
Cc: <[email protected]>
[ardb: make efivarfs_valid_name() static]
Signed-off-by: Ard Biesheuvel <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/vsec.c')
0 files changed, 0 insertions, 0 deletions
