syzbot


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

Status: auto-closed as invalid on 2022/07/12 01:43
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 172d, last: 172d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __iomap_dio_rw / xas_set_mark 3 248d 274d 0/24 auto-closed as invalid on 2022/04/27 17:42

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

write to 0xffff88812290c2ac of 4 bytes by task 8812 on cpu 0:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark+0x11e/0x130 lib/xarray.c:893
 __folio_start_writeback+0x2bf/0x5d0 mm/page-writeback.c:2949
 set_page_writeback+0x3d/0xe0 mm/folio-compat.c:78
 ext4_bio_write_page+0x119/0xb60 fs/ext4/page-io.c:451
 mpage_submit_page fs/ext4/inode.c:2102 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2348 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2487 [inline]
 ext4_writepages+0x1020/0x1d00 fs/ext4/inode.c:2816
 do_writepages+0x1db/0x350 mm/page-writeback.c:2443
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 filemap_write_and_wait_range+0xbf/0x2e0 mm/filemap.c:673
 __iomap_dio_rw+0x51e/0xf50 fs/iomap/direct-io.c:572
 iomap_dio_rw+0x3c/0x80 fs/iomap/direct-io.c:689
 ext4_dio_read_iter fs/ext4/file.c:79 [inline]
 ext4_file_read_iter+0x22d/0x2a0 fs/ext4/file.c:130
 call_read_iter include/linux/fs.h:2052 [inline]
 io_iter_do_read fs/io_uring.c:4307 [inline]
 io_read fs/io_uring.c:4426 [inline]
 io_issue_sqe+0x22f3/0xa9b0 fs/io_uring.c:8408
 io_wq_submit_work+0x41b/0x590 fs/io_uring.c:8597
 io_worker_handle_work+0x517/0xc50 fs/io-wq.c:597
 io_wqe_worker+0x1d1/0x940 fs/io-wq.c:644
 ret_from_fork+0x1f/0x30

read to 0xffff88812290c2ac of 4 bytes by task 8811 on cpu 1:
 xa_marked include/linux/xarray.h:419 [inline]
 mapping_tagged include/linux/fs.h:446 [inline]
 filemap_range_needs_writeback include/linux/pagemap.h:1165 [inline]
 __iomap_dio_rw+0x42e/0xf50 fs/iomap/direct-io.c:528
 iomap_dio_rw+0x3c/0x80 fs/iomap/direct-io.c:689
 ext4_dio_read_iter fs/ext4/file.c:79 [inline]
 ext4_file_read_iter+0x22d/0x2a0 fs/ext4/file.c:130
 call_read_iter include/linux/fs.h:2052 [inline]
 io_iter_do_read fs/io_uring.c:4307 [inline]
 io_read fs/io_uring.c:4426 [inline]
 io_issue_sqe+0x22f3/0xa9b0 fs/io_uring.c:8408
 io_queue_sqe fs/io_uring.c:8791 [inline]
 io_submit_sqe+0x2cfa/0x3ad0 fs/io_uring.c:9055
 io_submit_sqes+0x27b/0x500 fs/io_uring.c:9166
 __do_sys_io_uring_enter fs/io_uring.c:12098 [inline]
 __se_sys_io_uring_enter+0x24b/0xd60 fs/io_uring.c:12024
 __x64_sys_io_uring_enter+0x74/0x80 fs/io_uring.c:12024
 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+0x46/0xb0

value changed: 0x28000021 -> 0x10000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8811 Comm: syz-executor.3 Not tainted 5.19.0-rc1-syzkaller-00003-ge71e60cd74df-dirty #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 2022/06/07 01:37 upstream e71e60cd74df c8857892 .config log report info KCSAN: data-race in __iomap_dio_rw / xas_set_mark
* Struck through repros no longer work on HEAD.