syzbot


KCSAN: data-race in ext4_ext_insert_extent / ext4_fill_raw_inode

Status: auto-closed as invalid on 2022/01/19 18:17
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 375d, last: 355d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_ext_insert_extent / ext4_fill_raw_inode

write to 0xffff88812cfa0260 of 4 bytes by task 29809 on cpu 1:
 ext4_ext_store_pblock fs/ext4/ext4_extents.h:256 [inline]
 ext4_ext_insert_extent+0x1ba3/0x3060 fs/ext4/extents.c:2159
 ext4_ext_map_blocks+0x1779/0x2120 fs/ext4/extents.c:4306
 ext4_map_blocks+0x71e/0xf00 fs/ext4/inode.c:637
 mpage_map_one_extent+0x10d/0x3a0 fs/ext4/inode.c:2390
 mpage_map_and_submit_extent fs/ext4/inode.c:2443 [inline]
 ext4_writepages+0xcba/0x1e80 fs/ext4/inode.c:2795
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:407 [inline]
 __filemap_fdatawrite_range mm/filemap.c:440 [inline]
 file_write_and_wait_range+0x132/0x1d0 mm/filemap.c:824
 ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:182
 generic_write_sync include/linux/fs.h:2955 [inline]
 ext4_buffered_write_iter+0x322/0x380 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e7/0x1200
 call_write_iter include/linux/fs.h:2162 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:725
 do_iter_write+0x192/0x5c0 fs/read_write.c:851
 vfs_iter_write+0x4c/0x70 fs/read_write.c:892
 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:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
 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 0xffff88812cfa0260 of 4 bytes by task 29800 on cpu 0:
 ext4_fill_raw_inode+0x9ef/0xea0 fs/ext4/inode.c:4353
 ext4_do_update_inode fs/ext4/inode.c:5094 [inline]
 ext4_mark_iloc_dirty+0x364/0x890 fs/ext4/inode.c:5694
 __ext4_mark_inode_dirty+0x4ec/0x5f0 fs/ext4/inode.c:5890
 ext4_dirty_inode+0x86/0xa0 fs/ext4/inode.c:5919
 __mark_inode_dirty+0x72/0x6c0 fs/fs-writeback.c:2399
 mark_inode_dirty include/linux/fs.h:2451 [inline]
 generic_write_end+0x157/0x180 fs/buffer.c:2202
 ext4_da_write_end+0x4de/0x630 fs/ext4/inode.c:3059
 generic_perform_write+0x261/0x400 mm/filemap.c:3765
 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]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:725
 do_iter_write+0x192/0x5c0 fs/read_write.c:851
 vfs_iter_write+0x4c/0x70 fs/read_write.c:892
 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:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
 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

value changed: 0x00000000 -> 0x00036010

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 29800 Comm: syz-executor.0 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/15 18:08 upstream 5472f14a3742 572bcb40 .config log report info KCSAN: data-race in ext4_ext_insert_extent / ext4_fill_raw_inode
ci2-upstream-kcsan-gce 2021/12/15 00:06 upstream 5472f14a3742 f752fb53 .config log report info KCSAN: data-race in ext4_ext_insert_extent / ext4_fill_raw_inode
ci2-upstream-kcsan-gce 2021/11/26 09:11 upstream a4849f6000e2 63eeac02 .config log report info KCSAN: data-race in ext4_ext_insert_extent / ext4_fill_raw_inode
ci2-upstream-kcsan-gce 2021/11/25 18:14 upstream 5f53fa508db0 63eeac02 .config log report info KCSAN: data-race in ext4_ext_insert_extent / ext4_fill_raw_inode
* Struck through repros no longer work on HEAD.