syzbot


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

Status: auto-closed as invalid on 2021/11/02 08:37
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 445d, last: 434d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in copy_page_to_iter / ext4_mb_mark_diskspace_used 1 567d 567d 0/24 auto-closed as invalid on 2021/06/22 06:01
upstream KCSAN: data-race in copy_page_to_iter / ext4_mb_mark_diskspace_used (3) 1 387d 387d 0/24 auto-closed as invalid on 2021/12/18 20:29

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

write to 0xffff88813eb9b000 of 8 bytes by task 10871 on cpu 1:
 instrument_write include/linux/instrumented.h:42 [inline]
 __set_bit include/asm-generic/bitops/instrumented-non-atomic.h:27 [inline]
 __set_bit_le include/asm-generic/bitops/le.h:100 [inline]
 mb_set_bit fs/ext4/mballoc.c:471 [inline]
 ext4_set_bits fs/ext4/mballoc.c:1705 [inline]
 ext4_mb_mark_diskspace_used+0x5fc/0xca0 fs/ext4/mballoc.c:3847
 ext4_mb_new_blocks+0xae3/0x1fc0 fs/ext4/mballoc.c:5604
 ext4_ext_map_blocks+0x15ed/0x1ff0 fs/ext4/extents.c:4250
 ext4_map_blocks+0x71e/0xf00 fs/ext4/inode.c:637
 _ext4_get_block+0x103/0x290 fs/ext4/inode.c:793
 ext4_get_block_unwritten+0x26/0x30 fs/ext4/inode.c:824
 __block_write_begin_int+0x4c5/0x1080 fs/buffer.c:2010
 __block_write_begin+0x2b/0x40 fs/buffer.c:2060
 ext4_write_begin+0x41e/0xcc0
 ext4_da_write_begin+0x208/0x7f0 fs/ext4/inode.c:2966
 generic_perform_write+0x1b8/0x3e0 mm/filemap.c:3770
 ext4_buffered_write_iter+0x305/0x400 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x11f0
 call_write_iter include/linux/fs.h:2163 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x7bc/0x900 fs/read_write.c:594
 ksys_write+0xd9/0x190 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:656
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88813eb9b000 of 1377 bytes by task 10873 on cpu 0:
 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:805 [inline]
 copy_page_to_iter+0x2cb/0x950 lib/iov_iter.c:833
 filemap_read+0xee6/0x1220 mm/filemap.c:2683
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 blkdev_read_iter+0xb9/0xf0 block/fops.c:545
 call_read_iter include/linux/fs.h:2157 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:485
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

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

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/28 08:35 upstream 0513e464f900 78494d16 .config log report info KCSAN: data-race in copy_page_to_iter / ext4_mb_mark_diskspace_used
ci2-upstream-kcsan-gce 2021/09/23 02:21 upstream cf1d2c3e7e2f 8cac236e .config log report info KCSAN: data-race in copy_page_to_iter / ext4_mb_mark_diskspace_used
ci2-upstream-kcsan-gce 2021/09/17 08:57 upstream bdb575f87217 5b989942 .config log report info KCSAN: data-race in copy_page_to_iter / ext4_mb_mark_diskspace_used
* Struck through repros no longer work on HEAD.