syzbot


KCSAN: data-race in ext4_write_end / ext4_writepages (3)

Status: auto-closed as invalid on 2021/10/06 19:55
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 460d, last: 460d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_write_end / ext4_writepages (2) 6 599d 677d 0/24 auto-closed as invalid on 2021/05/21 11:18
upstream KCSAN: data-race in ext4_write_end / ext4_writepages (4) 2 391d 402d 0/24 auto-closed as invalid on 2021/12/15 03:02
upstream KCSAN: data-race in ext4_write_end / ext4_writepages (5) 1 306d 306d 0/24 auto-closed as invalid on 2022/03/10 10:14
upstream KCSAN: data-race in ext4_write_end / ext4_writepages 1 784d 784d 0/24 auto-closed as invalid on 2020/11/17 08:49

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_write_end / ext4_writepages

write to 0xffff88813bbb9718 of 8 bytes by task 18002 on cpu 0:
 i_size_write include/linux/fs.h:911 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3349 [inline]
 ext4_write_end+0x1c9/0x7f0 fs/ext4/inode.c:1309
 ext4_da_write_end+0x93/0x730 fs/ext4/inode.c:3079
 generic_perform_write+0x23a/0x3d0 mm/filemap.c:3784
 ext4_buffered_write_iter+0x305/0x400 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x11a0 fs/ext4/file.c:519
 call_write_iter include/linux/fs.h:2158 [inline]
 do_iter_readv_writev+0x2cd/0x370 fs/read_write.c:729
 do_iter_write+0x192/0x5c0 fs/read_write.c:855
 vfs_iter_write+0x4c/0x70 fs/read_write.c:896
 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+0x618/0xb90 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88813bbb9718 of 8 bytes by task 12476 on cpu 1:
 i_size_read include/linux/fs.h:889 [inline]
 mpage_submit_page fs/ext4/inode.c:2094 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2348 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2487 [inline]
 ext4_writepages+0x1018/0x1d30 fs/ext4/inode.c:2800
 do_writepages+0x8b/0x160 mm/page-writeback.c:2353
 __writeback_single_inode+0x80/0x440 fs/fs-writeback.c:1613
 writeback_sb_inodes+0x563/0xd30 fs/fs-writeback.c:1878
 __writeback_inodes_wb fs/fs-writeback.c:1947 [inline]
 wb_writeback+0x327/0x700 fs/fs-writeback.c:2053
 wb_check_background_flush fs/fs-writeback.c:2121 [inline]
 wb_do_writeback+0x4ce/0x510 fs/fs-writeback.c:2209
 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2237
 process_one_work+0x402/0x910 kernel/workqueue.c:2297
 worker_thread+0x636/0xae0 kernel/workqueue.c:2444
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

value changed: 0x0000000006bacc01 -> 0x0000000006bad000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12476 Comm: kworker/u4:0 Tainted: G        W         5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-8:0)
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/01 19:55 upstream 835d31d319d9 7eb7e152 .config log report info KCSAN: data-race in ext4_write_end / ext4_writepages
* Struck through repros no longer work on HEAD.