aboutsummaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorGravatar Jan Kara <jack@suse.cz> 2021-04-22 16:52:32 +0200
committerGravatar Jan Kara <jack@suse.cz> 2021-07-13 14:29:01 +0200
commitb092b3efc7cb239b6f33bb97da0f8812680e1046 (patch)
treed61a3007db3005aae514814d3d67721432418fda /fs/ext2
parentceph: Fix race between hole punch and page fault (diff)
downloadlinux-b092b3efc7cb239b6f33bb97da0f8812680e1046.tar.gz
linux-b092b3efc7cb239b6f33bb97da0f8812680e1046.tar.bz2
linux-b092b3efc7cb239b6f33bb97da0f8812680e1046.zip
cifs: Fix race between hole punch and page fault
Cifs has a following race between hole punching and page fault: CPU1 CPU2 smb3_fallocate() smb3_punch_hole() truncate_pagecache_range() filemap_fault() - loads old data into the page cache SMB2_ioctl(..., FSCTL_SET_ZERO_DATA, ...) And now we have stale data in the page cache. Fix the problem by locking out faults (as well as reads) using mapping->invalidate_lock while hole punch is running. CC: Steve French <sfrench@samba.org> CC: linux-cifs@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2')
0 files changed, 0 insertions, 0 deletions