syzbot


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

Status: auto-closed as invalid on 2022/04/30 05:08
Subsystems: fs mm
[Documentation on labels]
First crash: 755d, last: 755d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in writeback_sb_inodes / xas_set_mark ext4 23 1477d 1628d 0/26 auto-closed as invalid on 2020/06/12 04:43

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

write to 0xffff888135d488bc of 4 bytes by task 2751 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:2856
 set_page_writeback+0x3d/0xe0 mm/folio-compat.c:78
 __mpage_writepage+0xbe4/0xfa0 fs/mpage.c:609
 write_cache_pages+0x467/0xa80 mm/page-writeback.c:2243
 mpage_writepages+0x7b/0x100 fs/mpage.c:679
 fat_writepages+0x20/0x30 fs/fat/inode.c:205
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2352
 filemap_fdatawrite_wbc mm/filemap.c:388 [inline]
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0x134/0x1d0 mm/filemap.c:779
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1115
 fat_file_fsync+0x48/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2782 [inline]
 generic_file_write_iter+0x103/0x130 mm/filemap.c:3955
 call_write_iter include/linux/fs.h:2081 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:726
 do_iter_write+0x192/0x5c0 fs/read_write.c:852
 vfs_iter_write+0x4c/0x70 fs/read_write.c:893
 iter_file_splice_write+0x43a/0x790 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+0x106/0x190 fs/splice.c:979
 do_sendfile+0x675/0xc40 fs/read_write.c:1246
 __do_sys_sendfile64 fs/read_write.c:1305 [inline]
 __se_sys_sendfile64 fs/read_write.c:1297 [inline]
 __x64_sys_sendfile64+0xb9/0x140 fs/read_write.c:1297
 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

read to 0xffff888135d488bc of 4 bytes by task 1858 on cpu 0:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:488 [inline]
 requeue_inode fs/fs-writeback.c:1523 [inline]
 writeback_sb_inodes+0x926/0xdf0 fs/fs-writeback.c:1881
 wb_writeback+0x26b/0x650 fs/fs-writeback.c:2026
 wb_do_writeback+0x101/0x560 fs/fs-writeback.c:2169
 wb_workfn+0x98/0x400 fs/fs-writeback.c:2209
 process_one_work+0x3e3/0x970 kernel/workqueue.c:2289
 worker_thread+0x638/0xaa0 kernel/workqueue.c:2436
 kthread+0x1bf/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

value changed: 0x05000021 -> 0x00000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1858 Comm: kworker/u4:6 Not tainted 5.17.0-syzkaller-10752-g52d543b5497c-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-7:2)
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/26 05:07 upstream 52d543b5497c 89bc8608 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in writeback_sb_inodes / xas_set_mark
* Struck through repros no longer work on HEAD.