Hi,
On 8k page size machines, we should fail with -ENAMETOOLONG if the path
length is greater than PATH_MAX. Here is the fix.
As a plus we don't waste 4k of memory on these machines.
Cheers,
Anton
diff -ru --exclude=CVS linux/fs/dcache.c linux_sparc32/fs/dcache.c
--- linux/fs/dcache.c Mon Aug 14 07:26:15 2000
+++ linux_sparc32/fs/dcache.c Sun Sep 17 19:40:17 2000
@@ -1248,7 +1248,7 @@
panic("Cannot create buffer head SLAB cache");
names_cachep = kmem_cache_create("names_cache",
- PAGE_SIZE, 0,
+ PATH_MAX + 1, 0,
SLAB_HWCACHE_ALIGN, NULL, NULL);
if (!names_cachep)
panic("Cannot create names SLAB cache");
diff -ru --exclude=CVS linux/fs/namei.c linux_sparc32/fs/namei.c
--- linux/fs/namei.c Mon Aug 14 07:26:17 2000
+++ linux_sparc32/fs/namei.c Sun Sep 17 19:44:40 2000
@@ -107,7 +107,7 @@
static inline int do_getname(const char *filename, char *page)
{
int retval;
- unsigned long len = PAGE_SIZE;
+ unsigned long len = PATH_MAX + 1;
if ((unsigned long) filename >= TASK_SIZE) {
if (!segment_eq(get_fs(), KERNEL_DS))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:14 EST