diff options
author | Jan Kara <[email protected]> | 2021-04-22 16:38:26 +0200 |
---|---|---|
committer | Jan Kara <[email protected]> | 2021-07-13 14:29:01 +0200 |
commit | 057ba5b24532aca202cb1ae8c246bde27de12763 (patch) | |
tree | 3abff803cddcd5ef21b135f6c31cb1d05f908e6a /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 8bcbbe9c7c8e49281fc2e0a6c5455b87c85a9c2a (diff) |
ceph: Fix race between hole punch and page fault
Ceph has a following race between hole punching and page fault:
CPU1 CPU2
ceph_fallocate()
...
ceph_zero_pagecache_range()
ceph_filemap_fault()
faults in page in the range being
punched
ceph_zero_objects()
And now we have a page in punched range with invalid data. Fix the
problem by using mapping->invalidate_lock similarly to other
filesystems. Note that using invalidate_lock also fixes a similar race
wrt ->readpage().
CC: Jeff Layton <[email protected]>
CC: [email protected]
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions