syzbot


KCSAN: data-race in ext4_writepages / xas_clear_mark (6)

Status: auto-closed as invalid on 2021/09/19 19:45
Subsystems: mm fs
[Documentation on labels]
First crash: 1475d, last: 1475d
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_writepages / xas_clear_mark (5) fs mm 6 14 1603d 1726d 0/29 auto-closed as invalid on 2021/05/14 11:29
upstream KCSAN: data-race in ext4_writepages / xas_clear_mark (4) fs mm 6 5 1806d 1873d 0/29 auto-closed as invalid on 2020/10/24 01:56
upstream KCSAN: data-race in ext4_writepages / xas_clear_mark (7) fs mm 6 2 1429d 1432d 0/29 auto-closed as invalid on 2021/11/05 05:01
upstream KCSAN: data-race in ext4_writepages / xas_clear_mark (3) fs mm 6 1 1939d 1939d 0/29 auto-closed as invalid on 2020/06/18 13:43
upstream KCSAN: data-race in ext4_writepages / xas_clear_mark ext4 6 3 2130d 2136d 0/29 closed as invalid on 2019/11/19 13:24
upstream KCSAN: data-race in ext4_writepages / xas_clear_mark (2) ext4 6 1 2081d 2081d 0/29 auto-closed as invalid on 2020/02/26 13:18

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

write to 0xffff888106ec5d94 of 4 bytes by task 11050 on cpu 0:
 xa_mark_clear lib/xarray.c:75 [inline]
 xas_clear_mark+0x16c/0x180 lib/xarray.c:921
 __test_set_page_writeback+0x3e9/0x500 mm/page-writeback.c:2809
 ext4_bio_write_page+0xee/0xa40 fs/ext4/page-io.c:450
 mpage_submit_page fs/ext4/inode.c:2100 [inline]
 mpage_process_page_bufs+0x437/0x560 fs/ext4/inode.c:2214
 mpage_prepare_extent_to_map+0x4e6/0x640 fs/ext4/inode.c:2626
 ext4_writepages+0x6c6/0x1d10 fs/ext4/inode.c:2754
 do_writepages+0x7b/0x150 mm/page-writeback.c:2355
 __filemap_fdatawrite_range mm/filemap.c:413 [inline]
 file_write_and_wait_range+0x180/0x210 mm/filemap.c:792
 ext4_sync_file+0x105/0x670 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2987 [inline]
 ext4_buffered_write_iter+0x39c/0x3f0 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
 call_write_iter include/linux/fs.h:2114 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 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+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888106ec5d94 of 4 bytes by task 11037 on cpu 1:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:489 [inline]
 ext4_writepages+0x130/0x1d10 fs/ext4/inode.c:2668
 do_writepages+0x7b/0x150 mm/page-writeback.c:2355
 __filemap_fdatawrite_range mm/filemap.c:413 [inline]
 filemap_write_and_wait_range+0x20a/0x390 mm/filemap.c:686
 __iomap_dio_rw+0x4cd/0xa60 fs/iomap/direct-io.c:533
 iomap_dio_rw+0x30/0x70 fs/iomap/direct-io.c:649
 ext4_dio_write_iter fs/ext4/file.c:568 [inline]
 ext4_file_write_iter+0xa04/0x11d0 fs/ext4/file.c:678
 call_write_iter include/linux/fs.h:2114 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 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+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0e000021 -> 0x04000021

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/15 19:42 upstream ecf93431963a 2489ab88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in ext4_writepages / xas_clear_mark
* Struck through repros no longer work on HEAD.