diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ea97408e423e..e4a04d16b8b0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1162,6 +1162,8 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) | |||
1162 | } | 1162 | } |
1163 | if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR)) | 1163 | if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR)) |
1164 | return NULL; | 1164 | return NULL; |
1165 | if (name.len > NFS_SERVER(dir)->namelen) | ||
1166 | return NULL; | ||
1165 | /* Note: caller is already holding the dir->i_mutex! */ | 1167 | /* Note: caller is already holding the dir->i_mutex! */ |
1166 | dentry = d_alloc(parent, &name); | 1168 | dentry = d_alloc(parent, &name); |
1167 | if (dentry == NULL) | 1169 | if (dentry == NULL) |