syzbot


KCSAN: data-race in __filemap_fdatawrite_range / xas_clear_mark (3)

Status: closed as invalid on 2020/06/18 14:13
Subsystems: fs mm
[Documentation on labels]
First crash: 1893d, last: 1858d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_fdatawrite_range / xas_clear_mark (2) fs mm 6 4 1970d 1989d 0/29 auto-closed as invalid on 2020/05/07 21:06
upstream KCSAN: data-race in __filemap_fdatawrite_range / xas_clear_mark fs mm 6 1 2097d 2097d 0/29 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in __filemap_fdatawrite_range / xas_clear_mark (4) fs mm 6 29 1585d 1686d 0/29 auto-closed as invalid on 2021/04/22 20:50

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __filemap_fdatawrite_range / xas_clear_mark

write to 0xffff888120dd735c of 4 bytes by interrupt on cpu 0:
 xa_mark_clear lib/xarray.c:75 [inline]
 xas_clear_mark lib/xarray.c:918 [inline]
 xas_clear_mark+0x160/0x170 lib/xarray.c:899
 __xa_clear_mark+0xdd/0x110 lib/xarray.c:1726
 test_clear_page_writeback+0x46e/0x7e0 mm/page-writeback.c:2731
 end_page_writeback+0x98/0x180 mm/filemap.c:1317
 end_buffer_async_write+0x22d/0x260 fs/buffer.c:384
 end_bio_bh_io_sync+0x7d/0xa0 fs/buffer.c:3012
 bio_endio+0x2db/0x3e0 block/bio.c:1422
 req_bio_endio block/blk-core.c:245 [inline]
 blk_update_request+0x418/0x7a0 block/blk-core.c:1472
 blk_mq_end_request+0x4e/0x2f0 block/blk-mq.c:546
 lo_complete_rq+0x141/0x1a0 drivers/block/loop.c:490
 blk_done_softirq+0x1e6/0x250 block/blk-softirq.c:37
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 run_ksoftirqd+0x41/0x60 kernel/softirq.c:604
 smpboot_thread_fn+0x374/0x4a0 kernel/smpboot.c:165
 kthread+0x203/0x230 kernel/kthread.c:268
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

read to 0xffff888120dd735c of 4 bytes by task 15003 on cpu 1:
 mapping_tagged include/linux/fs.h:521 [inline]
 __filemap_fdatawrite_range+0x123/0x220 mm/filemap.c:417
 filemap_write_and_wait_range mm/filemap.c:654 [inline]
 filemap_write_and_wait_range+0xad/0x140 mm/filemap.c:648
 filemap_write_and_wait include/linux/fs.h:2767 [inline]
 __sync_blockdev+0x62/0x90 fs/block_dev.c:492
 __sync_filesystem fs/sync.c:40 [inline]
 sync_filesystem fs/sync.c:67 [inline]
 sync_filesystem+0x17b/0x1a0 fs/sync.c:48
 generic_shutdown_super+0x68/0x270 fs/super.c:448
 kill_block_super+0x58/0xa0 fs/super.c:1444
 deactivate_locked_super+0x5d/0xb0 fs/super.c:335
 deactivate_super fs/super.c:366 [inline]
 deactivate_super+0xca/0xe0 fs/super.c:362
 cleanup_mnt+0x27a/0x330 fs/namespace.c:1102
 __cleanup_mnt+0x1c/0x30 fs/namespace.c:1109
 task_work_run+0xba/0x120 kernel/task_work.c:123
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2ae/0x2c0 arch/x86/entry/common.c:165
 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
 do_syscall_64+0x38b/0x3b0 arch/x86/entry/common.c:305
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/18 13:00 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 3ea11d3f .config console log report ci2-upstream-kcsan-gce
2020/06/09 04:15 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 0d60b78a .config console log report ci2-upstream-kcsan-gce
2020/05/14 17:57 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2d572622 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.