summaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-10-13 15:43:54 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2007-10-13 15:43:54 +0200
commitb160292cc216a50fd0cd386b0bda2cd48352c73b (patch)
treeef07cf98f91353ee4c9ec1e1ca7a2a5d9d4b538a /fs/nfs/dir.c
parent[MTD] [NAND] Blackfin on-chip NAND Flash Controller driver (diff)
parentLinux 2.6.23 (diff)
downloadlinux-b160292cc216a50fd0cd386b0bda2cd48352c73b.tar.xz
linux-b160292cc216a50fd0cd386b0bda2cd48352c73b.zip
Merge Linux 2.6.23
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
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)
}
if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR))
return NULL;
+ if (name.len > NFS_SERVER(dir)->namelen)
+ return NULL;
/* Note: caller is already holding the dir->i_mutex! */
dentry = d_alloc(parent, &name);
if (dentry == NULL)