syzbot


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

Status: auto-closed as invalid on 2022/03/10 00:13
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 371d, last: 370d
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 518 423d 1087d 0/24 auto-closed as invalid on 2022/01/15 22:54
upstream KCSAN: data-race in ext4_writepages / xas_set_mark (3) 1 275d 275d 0/24 closed as invalid on 2022/05/13 11:20

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

write to 0xffff888137c2a7bc of 4 bytes by task 26306 on cpu 1:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark+0x11e/0x130 lib/xarray.c:889
 __folio_start_writeback+0x210/0x490 mm/page-writeback.c:2872
 set_page_writeback+0x39/0x50 mm/folio-compat.c:77
 ext4_bio_write_page+0x132/0xaa0 fs/ext4/page-io.c:455
 mpage_submit_page fs/ext4/inode.c:2080 [inline]
 mpage_process_page_bufs+0x437/0x560 fs/ext4/inode.c:2194
 mpage_prepare_extent_to_map+0x4f6/0x650 fs/ext4/inode.c:2604
 ext4_writepages+0x766/0x1e80 fs/ext4/inode.c:2732
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:384 [inline]
 __filemap_fdatawrite_range mm/filemap.c:417 [inline]
 filemap_write_and_wait_range+0x1b4/0x340 mm/filemap.c:669
 __iomap_dio_rw+0x535/0x10b0 fs/iomap/direct-io.c:561
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:680
 ext4_dio_read_iter fs/ext4/file.c:77 [inline]
 ext4_file_read_iter+0x21d/0x290 fs/ext4/file.c:128
 call_read_iter include/linux/fs.h:2068 [inline]
 generic_file_splice_read+0x24f/0x330 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 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 0xffff888137c2a7bc of 4 bytes by task 26304 on cpu 0:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:487 [inline]
 ext4_writepages+0x192/0x1e80 fs/ext4/inode.c:2646
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:384 [inline]
 __filemap_fdatawrite_range mm/filemap.c:417 [inline]
 filemap_write_and_wait_range+0x1b4/0x340 mm/filemap.c:669
 __iomap_dio_rw+0x535/0x10b0 fs/iomap/direct-io.c:561
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:680
 ext4_dio_read_iter fs/ext4/file.c:77 [inline]
 ext4_file_read_iter+0x21d/0x290 fs/ext4/file.c:128
 call_read_iter include/linux/fs.h:2068 [inline]
 generic_file_splice_read+0x24f/0x330 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 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: 0x0a000021 -> 0x06000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26304 Comm: syz-executor.3 Not tainted 5.17.0-rc2-syzkaller-00054-g27bb0b18c208 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2022/02/03 00:06 upstream 27bb0b18c208 4ebb2798 .config console log report info KCSAN: data-race in ext4_writepages / xas_set_mark
ci2-upstream-kcsan-gce 2022/02/02 05:09 upstream 9f7fb8de5d9b 4ebb2798 .config console log report info KCSAN: data-race in ext4_writepages / xas_set_mark
* Struck through repros no longer work on HEAD.