syzbot


KCSAN: data-race in __es_find_extent_range / __es_find_extent_range (3)

Status: auto-closed as invalid on 2021/12/20 16:23
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 387d, last: 387d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __es_find_extent_range / __es_find_extent_range 2 594d 599d 0/24 auto-closed as invalid on 2021/05/27 20:25
upstream KCSAN: data-race in __es_find_extent_range / __es_find_extent_range (2) 4 467d 536d 0/24 auto-closed as invalid on 2021/10/01 16:26

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

read to 0xffff8881396f28e8 of 8 bytes by task 6229 on cpu 1:
 __es_find_extent_range+0x79/0x330 fs/ext4/extents_status.c:272
 ext4_es_find_extent_range+0x87/0x200 fs/ext4/extents_status.c:320
 ext4_ext_put_gap_in_cache fs/ext4/extents.c:2280 [inline]
 ext4_ext_map_blocks+0xf97/0x2120 fs/ext4/extents.c:4190
 ext4_map_blocks+0x1cf/0xf00 fs/ext4/inode.c:562
 ext4_mpage_readpages+0x583/0x1080 fs/ext4/readpage.c:304
 ext4_readahead+0x99/0xa0 fs/ext4/inode.c:3199
 read_pages+0xba/0x5f0 mm/readahead.c:129
 page_cache_ra_unbounded+0x3d2/0x430 mm/readahead.c:238
 ondemand_readahead+0x4f8/0x700
 page_cache_async_ra+0xed/0x120 mm/readahead.c:608
 page_cache_async_readahead include/linux/pagemap.h:1036 [inline]
 filemap_readahead mm/filemap.c:2531 [inline]
 filemap_get_pages mm/filemap.c:2572 [inline]
 filemap_read+0x500/0x16d0 mm/filemap.c:2642
 generic_file_read_iter+0x72/0x2a0 mm/filemap.c:2792
 ext4_file_read_iter+0x1db/0x290
 call_read_iter include/linux/fs.h:2156 [inline]
 generic_file_splice_read+0x24f/0x330 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 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

write to 0xffff8881396f28e8 of 8 bytes by task 6228 on cpu 0:
 __es_find_extent_range+0x28e/0x330 fs/ext4/extents_status.c:298
 ext4_es_find_extent_range+0x87/0x200 fs/ext4/extents_status.c:320
 ext4_ext_put_gap_in_cache fs/ext4/extents.c:2280 [inline]
 ext4_ext_map_blocks+0xf97/0x2120 fs/ext4/extents.c:4190
 ext4_da_map_blocks fs/ext4/inode.c:1750 [inline]
 ext4_da_get_block_prep+0x43a/0x9e0 fs/ext4/inode.c:1827
 __block_write_begin_int+0x4c5/0x1010 fs/buffer.c:2010
 __block_write_begin+0x2b/0x40 fs/buffer.c:2060
 ext4_da_write_begin+0x34e/0x590 fs/ext4/inode.c:2969
 generic_perform_write+0x1c8/0x400 mm/filemap.c:3756
 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: 0xffff8881394b0320 -> 0xffff888105a6b410

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

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/15 16:23 upstream 8ab774587903 75b04091 .config log report info KCSAN: data-race in __es_find_extent_range / __es_find_extent_range
* Struck through repros no longer work on HEAD.