Jan Kara
b092b3efc7
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>
2021-07-13 14:29:01 +02:00
..
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-07-09 12:57:05 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-04-25 16:28:22 -05:00
2020-10-11 23:57:18 -05:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-06-23 19:26:40 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-07-09 12:48:58 -05:00
2021-07-09 13:03:36 -05:00
2021-07-09 12:48:58 -05:00
2021-07-02 18:36:23 -05:00
2021-06-20 21:28:17 -05:00
2020-06-01 00:10:18 -05:00
2021-07-07 16:43:17 -05:00
2021-07-02 18:35:25 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:16 -05:00
2021-06-23 19:24:30 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-07-08 18:25:04 -05:00
2021-07-08 18:25:04 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:16 -05:00
2020-12-14 09:16:22 -06:00
2020-08-02 18:00:25 -05:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2021-06-20 21:28:17 -05:00
2021-06-23 13:05:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-04-25 16:28:23 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-23 13:04:36 -05:00
2021-07-13 14:29:01 +02:00
2021-07-09 12:48:58 -05:00
2021-07-09 12:48:58 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-22 12:08:32 -05:00
2020-04-07 12:41:16 -05:00
2019-08-22 14:57:34 +10:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2019-01-24 09:37:33 -06:00
2021-05-27 14:04:32 -05:00
2021-07-02 18:35:25 -05:00
2021-04-25 16:28:23 -05:00
2020-07-05 14:23:38 -06:00
2021-06-20 21:28:17 -05:00