diff options
| author | Vladimir Zapolskiy <[email protected]> | 2014-09-24 15:21:04 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2014-11-07 18:52:20 +0000 |
| commit | 0936896056365349afa867c16e9f9100a6707cbf (patch) | |
| tree | 0fa7c920611d832417e38ab661a5795a2f6d8de1 /lib/bitmap.c | |
| parent | kobject: fix NULL pointer derefernce in kobj_child_ns_ops (diff) | |
| download | kernel-0936896056365349afa867c16e9f9100a6707cbf.tar.gz kernel-0936896056365349afa867c16e9f9100a6707cbf.zip | |
fs: sysfs: return EGBIG on write if offset is larger than file size
According to the user expectations common utilities like dd or sh
redirection operator > should work correctly over binary files from
sysfs. At the moment doing excessive write can not be completed:
write(1, "\0\0\0\0\0\0\0\0", 8) = 4
write(1, "\0\0\0\0", 4) = 0
write(1, "\0\0\0\0", 4) = 0
write(1, "\0\0\0\0", 4) = 0
...
Fix the problem by returning EFBIG described in man 2 write.
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions
