diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 834615f13f3e32f5f79498a109949ff77d301741..d79ca59370b6afe5553160a752d7a83483ef04a0 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -50,6 +50,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;