Messages in this thread Patch in this message | | | Date | Thu, 11 Sep 2003 13:59:57 +0200 | From | Martin Schwidefsky <> | Subject | [PATCH] sysfs & dput. |
| |
Hi Pat, there is another, small bug in sysfs. In sysfs_create_bin_file dentry gets assigned the error value of the call to sysfs_create if the call failed. The subsequent call to dput will crash. The solution is to remove the assignment of the error to dentry.
blue skies, Martin.
diffstat: fs/sysfs/file.c | 2 -- 1 files changed, 2 deletions(-)
diff -urN linux-2.6/fs/sysfs/file.c linux-2.6-s390/fs/sysfs/file.c --- linux-2.6/fs/sysfs/file.c Mon Sep 8 21:49:52 2003 +++ linux-2.6-s390/fs/sysfs/file.c Thu Sep 11 13:38:57 2003 @@ -356,8 +356,6 @@ error = sysfs_create(dentry,(attr->mode & S_IALLUGO) | S_IFREG,init_file); if (!error) dentry->d_fsdata = (void *)attr; - else - dentry = ERR_PTR(error); dput(dentry); } else error = PTR_ERR(dentry); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |