VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Benjamin Herrenschmidt <benh@kernel.crashing.org> 2013-10-10 18:03:55 +1100 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2013-10-14 10:07:19 -0700 commit: d723a92dd465d549bf79dd481c09d59f0be02936 parent: 785a162d147a547bc7a577c1c28f6fb9dbeb4f16
Commit Summary:
sysfs/bin: Fix size handling overflow for bin_attribute
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index c324ee906df0..5d818df7250b 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -156,7 +156,7 @@ static ssize_t sysfs_bin_read(struct file *file, char __user *userbuf,
 	struct sysfs_open_file *of = sysfs_of(file);
 	struct bin_attribute *battr = of->sd->s_bin_attr.bin_attr;
 	struct kobject *kobj = of->sd->s_parent->s_dir.kobj;
-	int size = file_inode(file)->i_size;
+	loff_t size = file_inode(file)->i_size;
 	int count = min_t(size_t, bytes, PAGE_SIZE);
 	loff_t offs = *off;
 	char *buf;