syzbot


KCSAN: data-race in copy_page_to_iter / ext4_free_group_clusters_set

Status: auto-closed as invalid on 2021/09/22 10:44
Subsystems: ext4
[Documentation on labels]
First crash: 1012d, last: 979d
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) ext4 1 865d 865d 0/26 auto-closed as invalid on 2022/01/14 11:38

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

write to 0xffff8881076aa00c of 2 bytes by task 11723 on cpu 0:
 ext4_free_group_clusters_set+0x1b/0x80 fs/ext4/super.c:379
 ext4_mb_mark_diskspace_used+0x744/0xca0 fs/ext4/mballoc.c:3786
 ext4_mb_new_blocks+0xab3/0x1f90 fs/ext4/mballoc.c:5533
 ext4_ext_map_blocks+0x1569/0x1f00 fs/ext4/extents.c:4245
 ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638
 _ext4_get_block+0xf6/0x290 fs/ext4/inode.c:794
 ext4_get_block_unwritten+0x26/0x30 fs/ext4/inode.c:825
 __block_write_begin_int+0x4a2/0x1060 fs/buffer.c:2006
 __block_write_begin+0x2b/0x40 fs/buffer.c:2056
 ext4_write_begin+0x41b/0xcc0 fs/ext4/ext4_jbd2.h:498
 ext4_da_write_begin+0x20e/0x820 fs/ext4/inode.c:2960
 generic_perform_write+0x196/0x3c0 mm/filemap.c:3656
 ext4_buffered_write_iter+0x2f2/0x3f0 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
 call_write_iter include/linux/fs.h:2114 [inline]
 aio_write+0x287/0x360 fs/aio.c:1578
 __io_submit_one fs/aio.c:1837 [inline]
 io_submit_one+0x82f/0x1350 fs/aio.c:1880
 __do_sys_io_submit fs/aio.c:1939 [inline]
 __se_sys_io_submit+0xf5/0x260 fs/aio.c:1909
 __x64_sys_io_submit+0x3f/0x50 fs/aio.c:1909
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881076aa000 of 1024 bytes by task 11725 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:801 [inline]
 copy_page_to_iter+0x2e1/0x940 lib/iov_iter.c:829
 filemap_read+0xef6/0x1220 mm/filemap.c:2605
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1671
 call_read_iter include/linux/fs.h:2108 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11725 Comm: systemd-udevd Not tainted 5.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/18 10:37 upstream 614cb2751d31 a2fe1cb5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in copy_page_to_iter / ext4_free_group_clusters_set
2021/07/16 05:14 upstream dd9c7df94c1b f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in copy_page_to_iter / ext4_free_group_clusters_set
* Struck through repros no longer work on HEAD.