syzbot


KCSAN: data-race in __xa_clear_mark / file_write_and_wait_range

Status: auto-closed as invalid on 2021/06/13 20:59
Subsystems: fs mm
[Documentation on labels]
First crash: 1072d, last: 1072d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __xa_clear_mark / file_write_and_wait_range

write to 0xffff88812694dc24 of 4 bytes by interrupt on cpu 0:
 xa_mark_clear lib/xarray.c:75 [inline]
 xas_clear_mark lib/xarray.c:921 [inline]
 __xa_clear_mark+0x2a2/0x2c0 lib/xarray.c:1917
 test_clear_page_writeback+0x23e/0x560 mm/page-writeback.c:2736
 end_page_writeback+0xd7/0x1b0 mm/filemap.c:1548
 end_buffer_async_write+0x1b0/0x250 fs/buffer.c:375
 end_bio_bh_io_sync+0x6f/0x90 fs/buffer.c:3026
 bio_endio+0x21d/0x300 block/bio.c:1423
 req_bio_endio block/blk-core.c:265 [inline]
 blk_update_request+0x435/0xa30 block/blk-core.c:1454
 blk_mq_end_request+0x22/0x50 block/blk-mq.c:565
 lo_complete_rq+0xca/0x170 drivers/block/loop.c:498
 blk_complete_reqs block/blk-mq.c:577 [inline]
 blk_done_softirq+0x69/0x90 block/blk-mq.c:582
 __do_softirq+0x12c/0x275 kernel/softirq.c:559
 run_ksoftirqd+0x13/0x20 kernel/softirq.c:921
 smpboot_thread_fn+0x2a1/0x3f0 kernel/smpboot.c:165
 kthread+0x1d0/0x1f0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffff88812694dc24 of 4 bytes by task 8834 on cpu 1:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:489 [inline]
 __filemap_fdatawrite_range mm/filemap.c:409 [inline]
 file_write_and_wait_range+0x14d/0x210 mm/filemap.c:792
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1079
 fat_file_fsync+0x48/0x100 fs/fat/file.c:190
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2982 [inline]
 generic_file_write_iter+0x103/0x130 mm/filemap.c:3825
 call_write_iter include/linux/fs.h:2114 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 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/0x650 fs/splice.c:891
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/09 20:58 upstream 9819f682e48c bc5434be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __xa_clear_mark / file_write_and_wait_range
* Struck through repros no longer work on HEAD.