syzbot


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

Status: auto-closed as invalid on 2021/12/15 03:02
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 404d, last: 392d
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 600d 679d 0/24 auto-closed as invalid on 2021/05/21 11:18
upstream KCSAN: data-race in ext4_write_end / ext4_writepages (5) 1 307d 307d 0/24 auto-closed as invalid on 2022/03/10 10:14
upstream KCSAN: data-race in ext4_write_end / ext4_writepages (3) 1 462d 462d 0/24 auto-closed as invalid on 2021/10/06 19:55
upstream KCSAN: data-race in ext4_write_end / ext4_writepages 1 785d 785d 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 0xffff8881399e3bc8 of 8 bytes by task 13061 on cpu 1:
 i_size_write include/linux/fs.h:913 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3421 [inline]
 ext4_write_end+0x16d/0x710 fs/ext4/inode.c:1303
 ext4_da_write_end+0x6d/0x630 fs/ext4/inode.c:3029
 generic_perform_write+0x261/0x400 mm/filemap.c:3767
 ext4_buffered_write_iter+0x25b/0x380 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x1200
 call_write_iter include/linux/fs.h:2162 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881399e3bc8 of 8 bytes by task 9098 on cpu 0:
 i_size_read include/linux/fs.h:891 [inline]
 mpage_submit_page fs/ext4/inode.c:2092 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2346 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2485 [inline]
 ext4_writepages+0x10b6/0x1e80 fs/ext4/inode.c:2798
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 __writeback_single_inode+0x80/0x4d0 fs/fs-writeback.c:1616
 writeback_sb_inodes+0x677/0xdf0 fs/fs-writeback.c:1881
 wb_writeback+0x26b/0x650 fs/fs-writeback.c:2054
 wb_do_writeback+0x101/0x560 fs/fs-writeback.c:2197
 wb_workfn+0xc8/0x440 fs/fs-writeback.c:2238
 process_one_work+0x3fc/0x980 kernel/workqueue.c:2298
 worker_thread+0x616/0xa70 kernel/workqueue.c:2445
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

value changed: 0x0000000000415000 -> 0x0000000000416000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9098 Comm: kworker/u4:7 Not tainted 5.15.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 (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/10 02:59 upstream cb690f5238d7 55fa030c .config log report info KCSAN: data-race in ext4_write_end / ext4_writepages
ci2-upstream-kcsan-gce 2021/10/29 18:19 upstream f25a5481af12 2353a3ec .config log report info KCSAN: data-race in ext4_write_end / ext4_writepages
* Struck through repros no longer work on HEAD.