syzbot


KCSAN: data-race in __filemap_fdatawrite_range / __xa_set_mark

Status: auto-closed as invalid on 2020/07/30 14:53
Subsystems: ext4
[Documentation on labels]
First crash: 1393d, last: 1393d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_fdatawrite_range / __xa_set_mark (2) ext4 2 1281d 1293d 0/26 auto-closed as invalid on 2020/11/19 10:40
upstream KCSAN: data-race in __filemap_fdatawrite_range / __xa_set_mark (3) ext4 1 1231d 1228d 0/26 auto-closed as invalid on 2021/01/08 20:40

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

write to 0xffff88812b8035dc of 4 bytes by task 29 on cpu 0:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark lib/xarray.c:886 [inline]
 __xa_set_mark+0x317/0x330 lib/xarray.c:1708
 __set_page_dirty+0x130/0x180 fs/buffer.c:610
 mark_buffer_dirty+0x101/0x230 fs/buffer.c:1138
 __ext4_handle_dirty_metadata+0x1d2/0x540 fs/ext4/ext4_jbd2.c:337
 ext4_do_update_inode fs/ext4/inode.c:5072 [inline]
 ext4_mark_iloc_dirty+0x12d2/0x1630 fs/ext4/inode.c:5624
 __ext4_mark_inode_dirty+0x2b9/0x3f0 fs/ext4/inode.c:5818
 ext4_dirty_inode+0xa6/0xc0 fs/ext4/inode.c:5854
 __mark_inode_dirty+0x72/0x7d0 fs/fs-writeback.c:2258
 mark_inode_dirty_sync include/linux/fs.h:2197 [inline]
 __writeback_single_inode+0x2f3/0x610 fs/fs-writeback.c:1508
 writeback_sb_inodes+0x5b8/0xe00 fs/fs-writeback.c:1716
 wb_writeback+0x2b8/0x730 fs/fs-writeback.c:1892
 wb_do_writeback+0x108/0x600 fs/fs-writeback.c:2037
 wb_workfn+0xb8/0x430 fs/fs-writeback.c:2078
 process_one_work+0x3cb/0x990 kernel/workqueue.c:2269
 worker_thread+0x665/0xbe0 kernel/workqueue.c:2415
 kthread+0x210/0x220 kernel/kthread.c:291
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293

read to 0xffff88812b8035dc of 4 bytes by task 8664 on cpu 1:
 xa_marked include/linux/xarray.h:416 [inline]
 mapping_tagged include/linux/fs.h:523 [inline]
 __filemap_fdatawrite_range+0x113/0x1d0 mm/filemap.c:417
 __filemap_fdatawrite mm/filemap.c:429 [inline]
 filemap_flush+0x1f/0x30 mm/filemap.c:456
 __sync_blockdev+0x69/0x70 fs/block_dev.c:489
 __sync_filesystem fs/sync.c:40 [inline]
 sync_filesystem+0xcb/0x160 fs/sync.c:64
 ovl_sync_fs+0x74/0x90 fs/overlayfs/super.c:281
 __sync_filesystem fs/sync.c:39 [inline]
 sync_filesystem+0x112/0x160 fs/sync.c:67
 generic_shutdown_super+0x42/0x210 fs/super.c:448
 kill_anon_super+0x23/0x40 fs/super.c:1108
 deactivate_locked_super+0x6a/0xb0 fs/super.c:335
 deactivate_super+0x85/0x90 fs/super.c:366
 cleanup_mnt+0x277/0x2e0 fs/namespace.c:1118
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1125
 task_work_run+0x8e/0x110 kernel/task_work.c:123
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop arch/x86/entry/common.c:216 [inline]
 __prepare_exit_to_usermode+0x1c8/0x230 arch/x86/entry/common.c:246
 __syscall_return_slowpath arch/x86/entry/common.c:329 [inline]
 do_syscall_64+0xb9/0x120 arch/x86/entry/common.c:368
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8664 Comm: syz-executor.0 Not tainted 5.8.0-rc2-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
2020/06/25 14:43 upstream 8be3a53e18e0 c7b4497a .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.