summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2018-11-19 13:31:10 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 20:38:00 +0100
commit427001403f3b12452553e727f1edb094f8b94b5c (patch)
tree56ec7d42d0fb757ac3c79f4f03aa68a8ca6bd6cf /arch
parentf306329dcaf67ff3271488373b7aab2f52c39151 (diff)
iomap: sub-block dio needs to zeroout beyond EOF
[ Upstream commit b450672fb66b4a991a5b55ee24209ac7ae7690ce ] 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 <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions