syzbot


KCSAN: data-race in __xa_set_mark / writeback_sb_inodes (3)

Status: auto-closed as invalid on 2021/06/26 23:47
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 494d, last: 450d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __xa_set_mark / writeback_sb_inodes 3 742d 776d 0/23 auto-closed as invalid on 2020/09/08 12:18
upstream KCSAN: data-race in __xa_set_mark / writeback_sb_inodes (2) 18 551d 617d 0/23 auto-closed as invalid on 2021/03/17 22:57

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

write to 0xffff8881013aac64 of 4 bytes by task 5107 on cpu 0:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark lib/xarray.c:889 [inline]
 __xa_set_mark+0x279/0x290 lib/xarray.c:1899
 __set_page_dirty+0x155/0x1a0 fs/buffer.c:609
 mark_buffer_dirty+0x126/0x200 fs/buffer.c:1133
 __block_commit_write fs/buffer.c:2104 [inline]
 block_write_end+0x13d/0x260 fs/buffer.c:2183
 blkdev_write_end+0x3c/0xc0 fs/block_dev.c:665
 generic_perform_write+0x23e/0x3a0 mm/filemap.c:3671
 __generic_file_write_iter+0x161/0x300 mm/filemap.c:3789
 blkdev_write_iter+0x1ea/0x2b0 fs/block_dev.c:1705
 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

read to 0xffff8881013aac64 of 4 bytes by task 3978 on cpu 1:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:489 [inline]
 requeue_inode fs/fs-writeback.c:1409 [inline]
 writeback_sb_inodes+0x822/0xf10 fs/fs-writeback.c:1759
 __writeback_inodes_wb fs/fs-writeback.c:1801 [inline]
 wb_writeback+0x327/0x700 fs/fs-writeback.c:1907
 wb_check_start_all fs/fs-writeback.c:2031 [inline]
 wb_do_writeback+0x330/0x510 fs/fs-writeback.c:2057
 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2091
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2275
 worker_thread+0x636/0xae0 kernel/workqueue.c:2421
 kthread+0x1d0/0x1f0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3978 Comm: kworker/u4:7 Not tainted 5.13.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-7:7)
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/05/22 23:42 upstream 23d729263037 3c7fef33 .config log report info KCSAN: data-race in __xa_set_mark / writeback_sb_inodes
ci2-upstream-kcsan-gce 2021/04/27 21:43 upstream 4a0225c3d208 805b5003 .config log report info KCSAN: data-race in __xa_set_mark / writeback_sb_inodes
ci2-upstream-kcsan-gce 2021/04/08 22:42 upstream 3fb4f979b4fa 6a81331a .config log report info KCSAN: data-race in __xa_set_mark / writeback_sb_inodes