summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy2015-05-21 23:21:16 +0200
committerGreg Kroah-Hartman2015-06-01 03:17:17 +0200
commiteaa5cd926345f86e9df1eb6b0490da539f5ce7d0 (patch)
treea1048947c68ae9bae7c93a3848387fcd557b5839 /fs/dcache.c
parentbase:dd - Fix for typo in comment to function driver_deferred_probe_trigger(). (diff)
downloadkernel-qcow2-linux-eaa5cd926345f86e9df1eb6b0490da539f5ce7d0.tar.gz
kernel-qcow2-linux-eaa5cd926345f86e9df1eb6b0490da539f5ce7d0.tar.xz
kernel-qcow2-linux-eaa5cd926345f86e9df1eb6b0490da539f5ce7d0.zip
fs: sysfs: don't pass count == 0 to bin file readers
If count == 0 bytes are requested by a reader, sysfs_kf_bin_read() deliberately returns 0 without passing a potentially harmful value to some externally defined underlying battr->read() function. However in case of (pos == size && count) the next clause always sets count to 0 and this value is handed over to battr->read(). The change intends to make obsolete (and remove later) a redundant sanity check in battr->read(), if it is present, or add more protection to struct bin_attribute users, who does not care about input arguments. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions