It is incorrectly precalculating the string's length. fs/sysfs/symlink.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/sysfs/symlink.c~sysfs_create_link-fix fs/sysfs/symlink.c --- 25/fs/sysfs/symlink.c~sysfs_create_link-fix 2003-05-17 14:08:57.000000000 -0700 +++ 25-akpm/fs/sysfs/symlink.c 2003-05-17 14:08:57.000000000 -0700 @@ -80,7 +80,7 @@ int sysfs_create_link(struct kobject * k char * s; depth = object_depth(kobj); - size = object_path_length(target) + depth * 3 - 1; + size = object_path_length(target) + depth * 3 + 1; if (size > PATH_MAX) return -ENAMETOOLONG; pr_debug("%s: depth = %d, size = %d\n",__FUNCTION__,depth,size); _