linux/fs/sysfs
NeilBrown 65da3484d9 sysfs: correctly handle short reads on PREALLOC attrs.
attributes declared with __ATTR_PREALLOC use sysfs_kf_read()
which ignores the 'count' arg.
So a 1-byte read request can return more bytes than that.

This is seen with the 'dash' shell when 'read' is used on
some 'md' sysfs attributes.

So only return the 'min' of count and the attribute length.

Signed-off-by: NeilBrown <neilb@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:42:22 +01:00
..
dir.c sysfs: Add support for permanently empty directories to serve as mount points. 2015-07-01 10:36:45 -05:00
file.c sysfs: correctly handle short reads on PREALLOC attrs. 2015-10-04 19:42:22 +01:00
group.c sysfs: disambiguate between "error code" and "failure" in comments 2015-05-24 12:31:33 -07:00
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
Makefile sysfs, kernfs: move inode code to fs/kernfs/inode.c 2013-11-29 17:55:10 -08:00
mount.c vfs: Commit to never having exectuables on proc and sysfs. 2015-07-10 10:39:25 -05:00
symlink.c kernfs: s/sysfs/kernfs/ in constants 2013-12-11 17:39:20 -08:00
sysfs.h kernfs: s/sysfs_dirent/kernfs_node/ and rename its friends accordingly 2013-12-11 15:28:36 -08:00