Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11e9b49b authored by Sripathi Kodi's avatar Sripathi Kodi Committed by Eric Van Hensbergen
Browse files

9p: Creating files with names too long should fail with ENAMETOOLONG.

parent 6d96d3ab
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);