syzbot


KCSAN: data-race in do_sync_mmap_readahead / ondemand_readahead (4)

Status: auto-closed as invalid on 2022/03/22 07:37
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 295d, last: 295d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in do_sync_mmap_readahead / ondemand_readahead (2) 1 536d 536d 0/24 auto-closed as invalid on 2021/07/24 19:56
upstream KCSAN: data-race in do_sync_mmap_readahead / ondemand_readahead (3) 1 367d 367d 0/24 auto-closed as invalid on 2022/01/09 16:13
upstream KCSAN: data-race in do_sync_mmap_readahead / ondemand_readahead 1 618d 618d 0/24 auto-closed as invalid on 2021/05/17 09:41

Sample crash report:
==================================================================
BUG: KCSAN: data-race in do_sync_mmap_readahead / ondemand_readahead

write to 0xffff88813758e2a4 of 4 bytes by task 9159 on cpu 0:
 do_sync_mmap_readahead+0x2ff/0x370 mm/filemap.c:3023
 filemap_fault+0x234/0x8b0 mm/filemap.c:3117
 __do_fault mm/memory.c:3868 [inline]
 do_shared_fault mm/memory.c:4238 [inline]
 do_fault mm/memory.c:4316 [inline]
 handle_pte_fault mm/memory.c:4570 [inline]
 __handle_mm_fault mm/memory.c:4705 [inline]
 handle_mm_fault+0xc78/0x1590 mm/memory.c:4803
 do_user_addr_fault+0x617/0xb90 arch/x86/mm/fault.c:1397
 handle_page_fault arch/x86/mm/fault.c:1484 [inline]
 exc_page_fault+0x91/0x290 arch/x86/mm/fault.c:1540
 asm_exc_page_fault+0x1e/0x30
 copy_user_enhanced_fast_string+0xe/0x40
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 _copy_to_user+0x77/0x90 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:200 [inline]
 io_uring_create+0x4d0/0x754 fs/io_uring.c:10554
 io_uring_setup fs/io_uring.c:10606 [inline]
 __do_sys_io_uring_setup fs/io_uring.c:10612 [inline]
 __se_sys_io_uring_setup fs/io_uring.c:10609 [inline]
 __x64_sys_io_uring_setup+0x118/0x130 fs/io_uring.c:10609
 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 0xffff88813758e2a4 of 4 bytes by task 9158 on cpu 1:
 ondemand_readahead+0x470/0x700 mm/readahead.c:551
 page_cache_async_ra+0xb5/0xe0 mm/readahead.c:608
 do_async_mmap_readahead+0x1f5/0x230 mm/filemap.c:3053
 filemap_fault+0x100/0x8b0 mm/filemap.c:3107
 __do_fault mm/memory.c:3868 [inline]
 do_read_fault mm/memory.c:4183 [inline]
 do_fault mm/memory.c:4312 [inline]
 handle_pte_fault mm/memory.c:4570 [inline]
 __handle_mm_fault mm/memory.c:4705 [inline]
 handle_mm_fault+0xba6/0x1590 mm/memory.c:4803
 faultin_page mm/gup.c:969 [inline]
 __get_user_pages+0x342/0xc10 mm/gup.c:1190
 populate_vma_page_range mm/gup.c:1522 [inline]
 __mm_populate+0x24d/0x370 mm/gup.c:1631
 mm_populate include/linux/mm.h:2702 [inline]
 vm_mmap_pgoff+0x160/0x1f0 mm/util.c:524
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1630
 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

value changed: 0x00000020 -> 0x00000008

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9158 Comm: syz-executor.4 Not tainted 5.17.0-rc4-syzkaller-00002-gd567f5db412e-dirty #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 2022/02/15 07:35 upstream d567f5db412e 8b9ca619 .config log report info KCSAN: data-race in do_sync_mmap_readahead / ondemand_readahead
* Struck through repros no longer work on HEAD.