syzbot


KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent

Status: auto-closed as invalid on 2020/05/15 19:56
Subsystems: ext4
[Documentation on labels]
First crash: 1789d, last: 1789d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent (5) ext4 3 1384d 1408d 0/28 auto-closed as invalid on 2021/05/20 02:45
upstream KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent (2) ext4 2 1704d 1707d 0/28 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent (6) ext4 1 1225d 1225d 0/28 auto-closed as invalid on 2021/10/26 05:04
upstream KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent (3) ext4 3 1580d 1591d 0/28 auto-closed as invalid on 2020/11/05 15:13
upstream KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent (4) ext4 2 1457d 1481d 0/28 auto-closed as invalid on 2021/03/08 22:40

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

write to 0xffff888128de3206 of 2 bytes by task 6825 on cpu 1:
 le16_add_cpu include/linux/byteorder/generic.h:146 [inline]
 ext4_ext_grow_indepth fs/ext4/extents.c:1330 [inline]
 ext4_ext_create_new_leaf fs/ext4/extents.c:1380 [inline]
 ext4_ext_insert_extent+0xee9/0x25d0 fs/ext4/extents.c:2053
 ext4_ext_map_blocks+0xbc7/0x20f0 fs/ext4/extents.c:4466
 ext4_map_blocks+0x230/0xcf0 fs/ext4/inode.c:622
 mpage_map_one_extent fs/ext4/inode.c:2365 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2418 [inline]
 ext4_writepages+0x108b/0x1d40 fs/ext4/inode.c:2772
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
 file_write_and_wait_range+0xfb/0x160 mm/filemap.c:760
 ext4_sync_file+0x26e/0x8b0 fs/ext4/fsync.c:153
 vfs_fsync_range+0x7c/0x150 fs/sync.c:197
 generic_write_sync include/linux/fs.h:2867 [inline]
 ext4_buffered_write_iter+0x211/0x280 fs/ext4/file.c:277
 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:693
 do_iter_write fs/read_write.c:998 [inline]
 do_iter_write+0x137/0x3a0 fs/read_write.c:979
 vfs_iter_write+0x56/0x80 fs/read_write.c:1039
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x396/0x810 fs/read_write.c:1520
 __do_sys_sendfile64 fs/read_write.c:1575 [inline]
 __se_sys_sendfile64 fs/read_write.c:1567 [inline]
 __x64_sys_sendfile64+0xb8/0x140 fs/read_write.c:1567
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888128de3206 of 2 bytes by task 6751 on cpu 0:
 ext_depth fs/ext4/ext4_extents.h:190 [inline]
 ext4_ext_index_trans_blocks+0x8d/0xc0 fs/ext4/extents.c:2504
 ext4_index_trans_blocks fs/ext4/inode.c:5471 [inline]
 ext4_meta_trans_blocks+0x86/0x190 fs/ext4/inode.c:5497
 ext4_da_writepages_trans_blocks fs/ext4/inode.c:2503 [inline]
 ext4_writepages+0xa5f/0x1d40 fs/ext4/inode.c:2751
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
 filemap_write_and_wait_range mm/filemap.c:654 [inline]
 filemap_write_and_wait_range+0xad/0x140 mm/filemap.c:648
 iomap_dio_rw+0x3a2/0x9a0 fs/iomap/direct-io.c:471
 ext4_dio_write_iter fs/ext4/file.c:532 [inline]
 ext4_file_write_iter+0xb84/0xd30 fs/ext4/file.c:640
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:693
 do_iter_write fs/read_write.c:998 [inline]
 do_iter_write+0x137/0x3a0 fs/read_write.c:979
 vfs_iter_write+0x56/0x80 fs/read_write.c:1039
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x396/0x810 fs/read_write.c:1520
 __do_sys_sendfile64 fs/read_write.c:1581 [inline]
 __se_sys_sendfile64 fs/read_write.c:1567 [inline]
 __x64_sys_sendfile64+0x121/0x140 fs/read_write.c:1567
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/06 19:55 https://github.com/google/ktsan.git kcsan 941e0d917bbf 7fb694ef .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.