]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sysfs: fix problems with binary files
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 20 Jan 2009 23:51:16 +0000 (15:51 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Feb 2009 17:53:20 +0000 (09:53 -0800)
commite44ab1f715d6610e40ce1a07ff060aa3df4ac00d
tree9eb14a41fc1f81c53761d659657d3182be3c344a
parent927fa1f2a1d683e0c07f184780c50bd1815b8fab
sysfs: fix problems with binary files

commit 4503efd0891c40e30928afb4b23dc3f99c62a6b2 upstream.

Some sysfs binary files don't like having 0 passed to them as a size.
Fix this up at the root by just returning to the vfs if userspace asks
us for a zero sized buffer.

Thanks to Pavel Roskin for pointing this out.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/bin.c