projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.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
|
blame
|
history
diff --git
a/fs/9p/vfs_inode.c
b/fs/9p/vfs_inode.c
index ae8396707707f2930dde969e7ce5a0d555964be0..905f664b8bc6fddc39f91b4abf810548631ef8b2 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);