syzbot


KCSAN: data-race in copy_page_to_iter / ext4_free_group_clusters_set (2)

Status: auto-closed as invalid on 2022/01/14 11:38
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 351d, last: 351d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in copy_page_to_iter / ext4_free_group_clusters_set 2 465d 498d 0/24 auto-closed as invalid on 2021/09/22 10:44

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

write to 0xffff888133f8700c of 2 bytes by task 29384 on cpu 0:
 ext4_free_group_clusters_set+0x1b/0x80 fs/ext4/super.c:377
 ext4_mb_mark_diskspace_used+0x761/0xc60 fs/ext4/mballoc.c:3857
 ext4_mb_new_blocks+0xae8/0x1ee0 fs/ext4/mballoc.c:5604
 ext4_alloc_branch fs/ext4/indirect.c:333 [inline]
 ext4_ind_map_blocks+0xb1c/0x1740 fs/ext4/indirect.c:628
 ext4_map_blocks+0x6e3/0xf00 fs/ext4/inode.c:639
 _ext4_get_block+0x103/0x290 fs/ext4/inode.c:793
 ext4_get_block+0x35/0x40 fs/ext4/inode.c:810
 __block_write_begin_int+0x4c5/0x1010 fs/buffer.c:2010
 __block_write_begin+0x2b/0x40 fs/buffer.c:2060
 ext4_write_begin+0x3fd/0xcc0
 ext4_da_write_begin+0x1fe/0x590 fs/ext4/inode.c:2941
 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

read to 0xffff888133f87000 of 1024 bytes by task 2103 on cpu 1:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:156 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:228 [inline]
 __copy_page_to_iter lib/iov_iter.c:852 [inline]
 copy_page_to_iter+0x2cb/0x950 lib/iov_iter.c:880
 filemap_read+0x138b/0x16d0 mm/filemap.c:2697
 generic_file_read_iter+0x72/0x2a0 mm/filemap.c:2792
 blkdev_read_iter+0x96/0x140 block/fops.c:584
 call_read_iter include/linux/fs.h:2156 [inline]
 new_sync_read fs/read_write.c:400 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:481
 ksys_read+0xd9/0x190 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:627
 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2103 Comm: udevd Not tainted 5.16.0-rc4-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/12/10 11:32 upstream ded746bfc943 4d4ce9bc .config log report info KCSAN: data-race in copy_page_to_iter / ext4_free_group_clusters_set
* Struck through repros no longer work on HEAD.