syzbot


KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range (4)

Status: auto-closed as invalid on 2022/02/16 13:29
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 415d, last: 320d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range (3) 1 479d 479d 0/24 auto-closed as invalid on 2021/09/09 20:32
upstream KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range (2) 221 556d 798d 0/24 auto-closed as invalid on 2021/06/25 01:53
upstream KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range 8 915d 1010d 0/24 closed as invalid on 2020/06/18 14:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range

write to 0xffff8881004055c0 of 8 bytes by task 3521 on cpu 0:
 page_cache_delete mm/filemap.c:146 [inline]
 __delete_from_page_cache+0x1e1/0x2c0 mm/filemap.c:231
 __remove_mapping+0x494/0x5f0 mm/vmscan.c:1317
 remove_mapping+0x22/0x60 mm/vmscan.c:1344
 invalidate_complete_page mm/truncate.c:216 [inline]
 invalidate_inode_page+0x15d/0x190 mm/truncate.c:265
 __invalidate_mapping_pages+0x111/0x2b0 mm/truncate.c:504
 invalidate_mapping_pages+0x23/0x30 mm/truncate.c:543
 invalidate_bdev+0x67/0x80 block/bdev.c:89
 loop_set_status+0x13f/0x5d0 drivers/block/loop.c:1260
 lo_ioctl+0x785/0x1270
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:609
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:860
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881004055c0 of 8 bytes by task 3513 on cpu 1:
 mapping_needs_writeback mm/filemap.c:646 [inline]
 file_write_and_wait_range+0x4b/0x1d0 mm/filemap.c:823
 blkdev_fsync+0x35/0x80 block/fops.c:465
 vfs_fsync_range+0x107/0x120 fs/sync.c:182
 generic_write_sync include/linux/fs.h:2894 [inline]
 blkdev_write_iter+0x2cf/0x340 block/fops.c:559
 call_write_iter include/linux/fs.h:2086 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:725
 do_iter_write+0x192/0x5c0 fs/read_write.c:851
 vfs_iter_write+0x4c/0x70 fs/read_write.c:892
 iter_file_splice_write+0x43a/0x790 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x675/0xc40 fs/read_write.c:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000075 -> 0x000000000000006a

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3513 Comm: syz-executor.5 Not tainted 5.16.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (7):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/01/12 13:20 upstream daadb3bd0e8d 44d1319a .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
ci2-upstream-kcsan-gce 2022/01/11 09:30 upstream fe8152b38d3a 1884f55a .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
ci2-upstream-kcsan-gce 2021/12/30 20:26 upstream 9bad743e8d22 2e49f10d .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
ci2-upstream-kcsan-gce 2021/12/03 09:52 upstream 5f58da2befa5 61f86278 .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
ci2-upstream-kcsan-gce 2021/11/17 17:41 upstream ee1703cda8dc cafff8b6 .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
ci2-upstream-kcsan-gce 2021/10/26 13:34 upstream 3906fe9bb7f1 d50eb50a .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
ci2-upstream-kcsan-gce 2021/10/09 12:02 upstream 5d6ab0bb408f 838e7e2c .config log report info KCSAN: data-race in __delete_from_page_cache / file_write_and_wait_range
* Struck through repros no longer work on HEAD.