syzbot


KCSAN: data-race in filemap_range_needs_writeback / xas_set_mark

Status: auto-closed as invalid on 2022/02/03 11:56
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 340d, last: 340d

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

write to 0xffff88813358f34c of 4 bytes by task 28737 on cpu 0:
 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:2868
 set_page_writeback+0x39/0x50 mm/folio-compat.c:77
 ext4_bio_write_page+0xdd/0x720 fs/ext4/page-io.c:455
 mpage_submit_page fs/ext4/inode.c:2095 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2343 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2482 [inline]
 ext4_writepages+0xe66/0x1a50 fs/ext4/inode.c:2795
 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]
 filemap_write_and_wait_range+0x1b2/0x340 mm/filemap.c:718
 __iomap_dio_rw+0x4bb/0x1070 fs/iomap/direct-io.c:560
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:679
 ext4_dio_read_iter fs/ext4/file.c:77 [inline]
 ext4_file_read_iter+0x190/0x1f0 fs/ext4/file.c:128
 call_read_iter include/linux/fs.h:2156 [inline]
 io_iter_do_read fs/io_uring.c:3505 [inline]
 io_read fs/io_uring.c:3562 [inline]
 io_issue_sqe+0xa75/0x53b0 fs/io_uring.c:6675
 io_wq_submit_work+0x1c5/0x370 fs/io_uring.c:6840
 io_worker_handle_work+0x4ca/0xbd0 fs/io-wq.c:576
 io_wqe_worker+0x1bc/0x4f0 fs/io-wq.c:632
 ret_from_fork+0x1f/0x30

read to 0xffff88813358f34c of 4 bytes by task 28736 on cpu 1:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:493 [inline]
 filemap_range_needs_writeback+0x59/0x460 mm/filemap.c:692
 __iomap_dio_rw+0x43f/0x1070 fs/iomap/direct-io.c:516
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:679
 ext4_dio_read_iter fs/ext4/file.c:77 [inline]
 ext4_file_read_iter+0x190/0x1f0 fs/ext4/file.c:128
 call_read_iter include/linux/fs.h:2156 [inline]
 io_iter_do_read fs/io_uring.c:3505 [inline]
 io_read fs/io_uring.c:3562 [inline]
 io_issue_sqe+0xa75/0x53b0 fs/io_uring.c:6675
 __io_queue_sqe+0x20/0x440 fs/io_uring.c:7022
 io_queue_sqe fs/io_uring.c:7064 [inline]
 io_submit_sqe+0x77a/0x47d3 fs/io_uring.c:7267
 io_submit_sqes+0x25d/0x670 fs/io_uring.c:7373
 __do_sys_io_uring_enter fs/io_uring.c:10076 [inline]
 __se_sys_io_uring_enter+0x212/0xb00 fs/io_uring.c:10018
 __x64_sys_io_uring_enter+0x74/0x80 fs/io_uring.c:10018
 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 -> 0x04000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 28736 Comm: syz-executor.0 Not tainted 5.16.0-rc7-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 Title
ci2-upstream-kcsan-gce 2021/12/30 11:56 upstream eec4df26e24e 2e49f10d .config log report info KCSAN: data-race in filemap_range_needs_writeback / xas_set_mark
* Struck through repros no longer work on HEAD.