syzbot


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

Status: auto-closed as invalid on 2022/01/02 10:49
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 421d, last: 363d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __delete_from_page_cache / ext4_writepages (3) 68 551d 719d 0/24 auto-closed as invalid on 2021/06/27 20:06
upstream KCSAN: data-race in __delete_from_page_cache / ext4_writepages 10 939d 1054d 0/24 auto-closed as invalid on 2020/06/18 13:43
upstream KCSAN: data-race in __delete_from_page_cache / ext4_writepages (2) 3 882d 889d 0/24 auto-closed as invalid on 2020/08/01 18:05

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

write to 0xffff88813959d7b0 of 8 bytes by task 24810 on cpu 0:
 page_cache_delete mm/filemap.c:146 [inline]
 __delete_from_page_cache+0x1e1/0x2c0 mm/filemap.c:231
 invalidate_complete_page2 mm/truncate.c:586 [inline]
 invalidate_inode_pages2_range+0x4d8/0x7c0 mm/truncate.c:677
 __iomap_dio_rw+0x5d2/0x1070 fs/iomap/direct-io.c:570
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:679
 ext4_dio_write_iter fs/ext4/file.c:568 [inline]
 ext4_file_write_iter+0xa72/0x1200 fs/ext4/file.c:679
 call_write_iter include/linux/fs.h:2162 [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

read to 0xffff88813959d7b0 of 8 bytes by task 24818 on cpu 1:
 ext4_writepages+0x16d/0x1e80 fs/ext4/inode.c:2663
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:407 [inline]
 __filemap_fdatawrite_range mm/filemap.c:440 [inline]
 file_write_and_wait_range+0x132/0x1d0 mm/filemap.c:824
 ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:182
 generic_write_sync include/linux/fs.h:2955 [inline]
 ext4_buffered_write_iter+0x322/0x380 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e7/0x1200
 call_write_iter include/linux/fs.h:2162 [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: 0x00000000000000ac -> 0x00000000000000ab

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

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/28 10:41 upstream 3498e7f2bb41 63eeac02 .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/11/18 06:34 upstream 42eb8fdac2fc cafff8b6 .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/11/16 22:17 upstream 8ab774587903 cafff8b6 .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/11/14 22:21 upstream ce49bfc8d037 75b04091 .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/11/06 21:40 upstream 512b7931ad05 4c1be0be .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/11/04 14:23 upstream ce840177930f 4c1be0be .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/10/07 23:09 upstream 4a16df549d23 efe0f24d .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
ci2-upstream-kcsan-gce 2021/10/01 04:29 upstream 4de593fb965f 1d849ab4 .config log report info KCSAN: data-race in __delete_from_page_cache / ext4_writepages
* Struck through repros no longer work on HEAD.