diff options
author | Dave Chinner <[email protected]> | 2018-11-19 13:31:10 -0800 |
---|---|---|
committer | Darrick J. Wong <[email protected]> | 2018-11-21 10:10:53 -0800 |
commit | b450672fb66b4a991a5b55ee24209ac7ae7690ce (patch) | |
tree | dcee5c6d6b1f32680c4b3a25741247dc1d6bcfe4 /net/nsh/nsh.c | |
parent | 0929d8580071c6a1cec1a7916a8f674c243ceee1 (diff) |
iomap: sub-block dio needs to zeroout beyond EOF
If we are doing sub-block dio that extends EOF, we need to zero
the unused tail of the block to initialise the data in it it. If we
do not zero the tail of the block, then an immediate mmap read of
the EOF block will expose stale data beyond EOF to userspace. Found
with fsx running sub-block DIO sizes vs MAPREAD/MAPWRITE operations.
Fix this by detecting if the end of the DIO write is beyond EOF
and zeroing the tail if necessary.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'net/nsh/nsh.c')
0 files changed, 0 insertions, 0 deletions