syzbot


KCSAN: data-race in _copy_to_iter / fat_set_state

Status: auto-closed as invalid on 2022/09/08 00:15
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 114d, last: 114d

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

write to 0xffff88811d76b025 of 1 bytes by task 1845 on cpu 1:
 fat_set_state+0x16a/0x1d0
 fat_put_super+0x2a/0x80 fs/fat/inode.c:737
 generic_shutdown_super+0xd5/0x240 fs/super.c:462
 kill_block_super+0x4a/0x90 fs/super.c:1394
 deactivate_locked_super+0x6a/0xb0 fs/super.c:332
 deactivate_super+0x85/0x90 fs/super.c:363
 cleanup_mnt+0x267/0x2d0 fs/namespace.c:1186
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1193
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88811d76b000 of 256 bytes by task 2366 on cpu 0:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:154 [inline]
 _copy_to_iter+0x18c/0x820 lib/iov_iter.c:499
 __copy_page_to_iter lib/iov_iter.c:694 [inline]
 copy_page_to_iter+0x1c6/0x3e0 lib/iov_iter.c:709
 copy_folio_to_iter include/linux/uio.h:153 [inline]
 filemap_read+0x119b/0x1430 mm/filemap.c:2717
 blkdev_read_iter+0x2c6/0x370 block/fops.c:598
 call_read_iter include/linux/fs.h:2182 [inline]
 new_sync_read fs/read_write.c:390 [inline]
 vfs_read+0x3a9/0x570 fs/read_write.c:471
 ksys_read+0xe8/0x1a0 fs/read_write.c:609
 __do_sys_read fs/read_write.c:619 [inline]
 __se_sys_read fs/read_write.c:617 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:617
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2366 Comm: udevd Not tainted 5.19.0-syzkaller-02990-gff89dd08c0f0-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/08/04 00:07 upstream ff89dd08c0f0 1c9013ac .config log report info KCSAN: data-race in _copy_to_iter / fat_set_state
* Struck through repros no longer work on HEAD.