syzbot


KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent (3)

Status: auto-closed as invalid on 2020/11/05 15:13
Subsystems: ext4
[Documentation on labels]
First crash: 1591d, last: 1580d
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 1385d 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 1705d 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 1226d 1226d 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 (4) ext4 2 1457d 1482d 0/28 auto-closed as invalid on 2021/03/08 22:40
upstream KCSAN: data-race in ext4_ext_index_trans_blocks / ext4_ext_insert_extent ext4 1 1789d 1789d 0/28 auto-closed as invalid on 2020/05/15 19:56

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

write to 0xffff8880a3e9064e of 2 bytes by task 11175 on cpu 0:
 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+0xc8c/0x2b80 fs/ext4/extents.c:2053
 ext4_ext_map_blocks+0x1776/0x20c0 fs/ext4/extents.c:4259
 ext4_map_blocks+0x6bf/0xf40 fs/ext4/inode.c:625
 mpage_map_one_extent+0x10d/0x3c0 fs/ext4/inode.c:2376
 mpage_map_and_submit_extent fs/ext4/inode.c:2429 [inline]
 ext4_writepages+0xa4c/0x1ed0 fs/ext4/inode.c:2781
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19b/0x1d0 mm/filemap.c:422
 filemap_write_and_wait_range+0x8b/0x2a0 mm/filemap.c:655
 iomap_dio_rw+0x371/0x980 fs/iomap/direct-io.c:478
 ext4_dio_write_iter fs/ext4/file.c:548 [inline]
 ext4_file_write_iter+0xdd5/0x1060 fs/ext4/file.c:658
 call_write_iter include/linux/fs.h:1882 [inline]
 do_iter_readv_writev+0x32e/0x3d0 fs/read_write.c:721
 do_iter_write+0x112/0x4b0 fs/read_write.c:1026
 vfs_iter_write+0x4c/0x70 fs/read_write.c:1067
 iter_file_splice_write+0x41a/0x770 fs/splice.c:750
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x95/0x160 fs/splice.c:1016
 splice_direct_to_actor+0x365/0x660 fs/splice.c:971
 do_splice_direct+0xf2/0x170 fs/splice.c:1059
 do_sendfile+0x56a/0xba0 fs/read_write.c:1548
 __do_sys_sendfile64 fs/read_write.c:1609 [inline]
 __se_sys_sendfile64 fs/read_write.c:1595 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1595
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880a3e9064e of 2 bytes by task 11178 on cpu 1:
 ext_depth fs/ext4/ext4_extents.h:193 [inline]
 ext4_ext_index_trans_blocks+0x82/0xb0 fs/ext4/extents.c:2355
 ext4_index_trans_blocks fs/ext4/inode.c:5517 [inline]
 ext4_meta_trans_blocks fs/ext4/inode.c:5543 [inline]
 ext4_da_writepages_trans_blocks fs/ext4/inode.c:2513 [inline]
 ext4_writepages+0x830/0x1ed0 fs/ext4/inode.c:2761
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19b/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0xfc/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2747 [inline]
 ext4_buffered_write_iter+0x369/0x3b0 fs/ext4/file.c:276
 ext4_file_write_iter+0x768/0x1060 include/linux/fs.h:784
 call_write_iter include/linux/fs.h:1882 [inline]
 do_iter_readv_writev+0x32e/0x3d0 fs/read_write.c:721
 do_iter_write+0x112/0x4b0 fs/read_write.c:1026
 vfs_iter_write+0x4c/0x70 fs/read_write.c:1067
 iter_file_splice_write+0x41a/0x770 fs/splice.c:750
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x95/0x160 fs/splice.c:1016
 splice_direct_to_actor+0x365/0x660 fs/splice.c:971
 do_splice_direct+0xf2/0x170 fs/splice.c:1059
 do_sendfile+0x56a/0xba0 fs/read_write.c:1548
 __do_sys_sendfile64 fs/read_write.c:1603 [inline]
 __se_sys_sendfile64 fs/read_write.c:1595 [inline]
 __x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1595
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11178 Comm: syz-executor.3 Not tainted 5.9.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/01 15:13 upstream 60e720931556 4103fce0 .config console log report info ci2-upstream-kcsan-gce
2020/09/24 05:29 upstream c9c9e6a49f89 54289b08 .config console log report info ci2-upstream-kcsan-gce
2020/09/20 21:18 upstream bdcf11de8f77 9564d2e9 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.