syzbot


KCSAN: data-race in ext4_writepages / xas_set_mark (3)

Status: closed as invalid on 2022/05/13 11:20
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 272d, last: 272d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_writepages / xas_set_mark (2) 2 367d 367d 0/24 auto-closed as invalid on 2022/03/10 00:13
upstream KCSAN: data-race in ext4_writepages / xas_set_mark 518 420d 1084d 0/24 auto-closed as invalid on 2022/01/15 22:54

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

write to 0xffff888125d0246c of 4 bytes by task 9650 on cpu 0:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark+0x11e/0x130 lib/xarray.c:893
 tag_pages_for_writeback+0x9d/0x290 mm/page-writeback.c:2121
 ext4_writepages+0x66f/0x1d00 fs/ext4/inode.c:2742
 do_writepages+0x1db/0x350 mm/page-writeback.c:2352
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xd6/0x170 mm/filemap.c:779
 ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2732 [inline]
 ext4_buffered_write_iter+0x2ec/0x330 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e3/0x1210
 do_iter_readv_writev+0x27b/0x300
 do_iter_write+0x16f/0x5c0 fs/read_write.c:852
 vfs_iter_write+0x4c/0x70 fs/read_write.c:893
 iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1246
 __do_sys_sendfile64 fs/read_write.c:1305 [inline]
 __se_sys_sendfile64 fs/read_write.c:1297 [inline]
 __x64_sys_sendfile64+0xb9/0x150 fs/read_write.c:1297
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888125d0246c of 4 bytes by task 9652 on cpu 1:
 xa_marked include/linux/xarray.h:419 [inline]
 mapping_tagged include/linux/fs.h:458 [inline]
 ext4_writepages+0x195/0x1d00 fs/ext4/inode.c:2672
 do_writepages+0x1db/0x350 mm/page-writeback.c:2352
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xd6/0x170 mm/filemap.c:779
 ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2732 [inline]
 ext4_buffered_write_iter+0x2ec/0x330 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e3/0x1210
 do_iter_readv_writev+0x27b/0x300
 do_iter_write+0x16f/0x5c0 fs/read_write.c:852
 vfs_iter_write+0x4c/0x70 fs/read_write.c:893
 iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1246
 __do_sys_sendfile64 fs/read_write.c:1311 [inline]
 __se_sys_sendfile64 fs/read_write.c:1297 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1297
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x08000021 -> 0x10000021

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

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2022/05/09 02:39 upstream c5eb0a61238d e60b1103 .config console log report info KCSAN: data-race in ext4_writepages / xas_set_mark
* Struck through repros no longer work on HEAD.