OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d96d3a
)
9p: Creating files with names too long should fail with ENAMETOOLONG.
author
Sripathi Kodi
<sripathik@in.ibm.com>
Mon, 29 Mar 2010 23:13:59 +0000
(18:13 -0500)
committer
Eric Van Hensbergen
<ericvh@gmail.com>
Mon, 5 Apr 2010 15:37:37 +0000
(10:37 -0500)
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
fs/9p/vfs_inode.c
patch
|
blob
|
history
diff --git
a/fs/9p/vfs_inode.c
b/fs/9p/vfs_inode.c
index
ae83967
..
905f664
100644
(file)
--- a/
fs/9p/vfs_inode.c
+++ b/
fs/9p/vfs_inode.c
@@
-660,6
+660,9
@@
static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n",
dir, dentry->d_name.name, dentry, nameidata);
+ if (dentry->d_name.len > NAME_MAX)
+ return ERR_PTR(-ENAMETOOLONG);
+
sb = dir->i_sb;
v9ses = v9fs_inode2v9ses(dir);
dfid = v9fs_fid_lookup(dentry->d_parent);