syzbot


KCSAN: data-race in __iomap_dio_rw / xas_set_mark

Status: auto-closed as invalid on 2022/04/27 17:42
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 284d, last: 257d
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 (2) 1 182d 180d 0/24 auto-closed as invalid on 2022/07/12 01:43

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

write to 0xffff888134daf41c of 4 bytes by task 9525 on cpu 1:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark+0x11e/0x130 lib/xarray.c:889
 __folio_start_writeback+0x2c7/0x5f0 mm/page-writeback.c:2860
 set_page_writeback+0x3d/0xe0 mm/folio-compat.c:77
 ext4_bio_write_page+0xf7/0x8b0 fs/ext4/page-io.c:452
 mpage_submit_page fs/ext4/inode.c:2089 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2335 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline]
 ext4_writepages+0xe76/0x1a60 fs/ext4/inode.c:2803
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2352
 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+0x4f6/0x10a0 fs/iomap/direct-io.c:563
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:682
 ext4_dio_read_iter fs/ext4/file.c:79 [inline]
 ext4_file_read_iter+0x19c/0x200 fs/ext4/file.c:130
 call_read_iter include/linux/fs.h:2075 [inline]
 io_iter_do_read fs/io_uring.c:3789 [inline]
 io_read fs/io_uring.c:3859 [inline]
 io_issue_sqe+0x19bb/0x8200 fs/io_uring.c:7172
 io_wq_submit_work+0x1d5/0x380 fs/io_uring.c:7340
 io_worker_handle_work+0x528/0xc20 fs/io-wq.c:595
 io_wqe_worker+0x1e6/0x540 fs/io-wq.c:642
 ret_from_fork+0x1f/0x30

read to 0xffff888134daf41c of 4 bytes by task 9524 on cpu 0:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:488 [inline]
 filemap_range_needs_writeback include/linux/pagemap.h:980 [inline]
 __iomap_dio_rw+0x411/0x10a0 fs/iomap/direct-io.c:519
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:682
 ext4_dio_read_iter fs/ext4/file.c:79 [inline]
 ext4_file_read_iter+0x19c/0x200 fs/ext4/file.c:130
 call_read_iter include/linux/fs.h:2075 [inline]
 io_iter_do_read fs/io_uring.c:3789 [inline]
 io_read fs/io_uring.c:3859 [inline]
 io_issue_sqe+0x19bb/0x8200 fs/io_uring.c:7172
 __io_queue_sqe+0x23/0x7a0 fs/io_uring.c:7526
 io_queue_sqe fs/io_uring.c:7568 [inline]
 io_submit_sqe+0x7d2/0x4ac1 fs/io_uring.c:7776
 io_submit_sqes+0x278/0x6c0 fs/io_uring.c:7882
 __do_sys_io_uring_enter fs/io_uring.c:10924 [inline]
 __se_sys_io_uring_enter+0x2a2/0xbe0 fs/io_uring.c:10850
 __x64_sys_io_uring_enter+0x74/0x80 fs/io_uring.c:10850
 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: 0x0a000021 -> 0x04000021

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

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/03/23 17:37 upstream 3bf03b9a0839 5ff41e94 .config log report info KCSAN: data-race in __iomap_dio_rw / xas_set_mark
ci2-upstream-kcsan-gce 2022/03/17 22:44 upstream 56e337f2cf13 dfa9a8ed .config log report info KCSAN: data-race in __iomap_dio_rw / xas_set_mark
ci2-upstream-kcsan-gce 2022/02/25 05:30 upstream 53ab78cd6d5a 7c337266 .config log report info KCSAN: data-race in __iomap_dio_rw / xas_set_mark
* Struck through repros no longer work on HEAD.