mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tmpfs 1/7 LTP ENAMETOOLONG
@ 2003-10-15 18:18 Hugh Dickins
  2003-10-15 18:19 ` [PATCH] tmpfs 2/7 LTP S_ISGID dir Hugh Dickins
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Hugh Dickins @ 2003-10-15 18:18 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Christoph Rohland, linux-kernel

First of 2+3+2 tmpfs patches, based on 2.6.0-test7-mm1, total diffstat:

 fs/hugetlbfs/inode.c |   20 +++++++++++++---
 fs/libfs.c           |    2 +
 fs/ramfs/inode.c     |    7 +++++
 mm/shmem.c           |   63 +++++++++++++++++++++++++++++++++++++++++----------
 4 files changed, 77 insertions(+), 15 deletions(-)

[PATCH] tmpfs 1/7 LTP ENAMETOOLONG

LTP tests the filesystem on /tmp: many failures when tmpfs because
simple_lookup forgot to reject filenames longer than the NAME_MAX
tmpfs declares in its statfs.  This also fixes ramfs and hugetlbfs.

--- 2.6.0-test7-mm1/fs/libfs.c	2003-10-08 20:24:55.000000000 +0100
+++ tmpfs1/fs/libfs.c	2003-10-15 15:38:30.349562896 +0100
@@ -32,6 +32,8 @@
 
 struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
 {
+	if (dentry->d_name.len > NAME_MAX)
+		return ERR_PTR(-ENAMETOOLONG);
 	d_add(dentry, NULL);
 	return NULL;
 }


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-10-15 20:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 18:18 [PATCH] tmpfs 1/7 LTP ENAMETOOLONG Hugh Dickins
2003-10-15 18:19 ` [PATCH] tmpfs 2/7 LTP S_ISGID dir Hugh Dickins
2003-10-15 19:34   ` viro
2003-10-15 19:48     ` Hugh Dickins
2003-10-15 19:55       ` viro
2003-10-15 20:18         ` Hugh Dickins
2003-10-15 18:21 ` [PATCH] tmpfs 3/7 swapoff/truncate race Hugh Dickins
2003-10-15 18:22 ` [PATCH] tmpfs 4/7 getpage/truncate race Hugh Dickins
2003-10-15 18:23 ` [PATCH] tmpfs 5/7 writepage/truncate race Hugh Dickins
2003-10-15 18:24 ` [PATCH] tmpfs 6/7 write i_size_write Hugh Dickins
2003-10-15 18:24 ` [PATCH] tmpfs 7/7 write mark_page_accessed Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®