syzbot


KCSAN: data-race in copy_page_from_iter_atomic / pagecache_isize_extended

Status: upstream: reported on 2025/05/06 07:52
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+189d4742d07e937d68ea@syzkaller.appspotmail.com
First crash: 2d10h, last: 2d10h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KCSAN: data-race in copy_page_from_iter_atomic / pagecache_isize_extended 0 (1) 2025/05/06 07:52

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

read to 0xffff88811d47e000 of 2048 bytes by task 37 on cpu 0:
 memcpy_from_iter lib/iov_iter.c:73 [inline]
 iterate_bvec include/linux/iov_iter.h:123 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:304 [inline]
 iterate_and_advance include/linux/iov_iter.h:328 [inline]
 __copy_from_iter lib/iov_iter.c:249 [inline]
 copy_page_from_iter_atomic+0x77f/0xff0 lib/iov_iter.c:483
 copy_folio_from_iter_atomic include/linux/uio.h:210 [inline]
 generic_perform_write+0x2c2/0x490 mm/filemap.c:4121
 shmem_file_write_iter+0xc5/0xf0 mm/shmem.c:3464
 lo_rw_aio+0x5f7/0x7c0 drivers/block/loop.c:-1
 do_req_filebacked drivers/block/loop.c:-1 [inline]
 loop_handle_cmd drivers/block/loop.c:1866 [inline]
 loop_process_work+0x52d/0xa60 drivers/block/loop.c:1901
 loop_workfn+0x31/0x40 drivers/block/loop.c:1925
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3319
 worker_thread+0x582/0x770 kernel/workqueue.c:3400
 kthread+0x486/0x510 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

write to 0xffff88811d47e018 of 4072 bytes by task 4432 on cpu 1:
 zero_user_segments include/linux/highmem.h:278 [inline]
 folio_zero_segment include/linux/highmem.h:635 [inline]
 pagecache_isize_extended+0x26f/0x340 mm/truncate.c:850
 ext4_alloc_file_blocks+0x4ad/0x720 fs/ext4/extents.c:4545
 ext4_do_fallocate fs/ext4/extents.c:4694 [inline]
 ext4_fallocate+0x2b8/0x660 fs/ext4/extents.c:4750
 vfs_fallocate+0x410/0x450 fs/open.c:338
 ksys_fallocate fs/open.c:362 [inline]
 __do_sys_fallocate fs/open.c:367 [inline]
 __se_sys_fallocate fs/open.c:365 [inline]
 __x64_sys_fallocate+0x7a/0xd0 fs/open.c:365
 x64_sys_call+0x2b88/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:286
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4432 Comm: syz.8.11649 Not tainted 6.15.0-rc5-syzkaller-00022-g01f95500a162 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/06 04:08 upstream 01f95500a162 ae98e6b9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_page_from_iter_atomic / pagecache_isize_extended
* Struck through repros no longer work on HEAD.