diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 586c5709dfb554e9ed0808170367ee94fe6e0304..34438981ddd805a8612bc6beabdb12c583f6cb67 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -90,6 +90,10 @@ static int efivarfs_d_compare(const struct dentry *dentry, { int guid = len - EFI_VARIABLE_GUID_LEN; + /* Parallel lookups may produce a temporary invalid filename */ + if (guid <= 0) + return 1; + if (name->len != len) return 1;