syzbot


KCSAN: data-race in shmem_fallocate / shmem_fault (9)

Status: moderation: reported on 2024/10/17 04:10
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+76cc716982cf0254f302@syzkaller.appspotmail.com
First crash: 35d, last: 12h38m
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (6) mm 1 474d 474d 0/28 auto-obsoleted due to no activity on 2023/09/08 14:27
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (2) mm 2 1311d 1315d 0/28 auto-closed as invalid on 2021/05/24 18:53
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (3) mm 2 1111d 1129d 0/28 auto-closed as invalid on 2021/12/11 00:12
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (4) mm 1 719d 719d 0/28 auto-obsoleted due to no activity on 2023/01/13 18:30
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (8) mm 7 74d 112d 0/28 auto-obsoleted due to no activity on 2024/10/13 06:13
upstream KCSAN: data-race in shmem_fallocate / shmem_fault mm 1 1510d 1510d 0/28 auto-closed as invalid on 2020/11/07 06:23
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (5) mm 1 602d 602d 0/28 auto-obsoleted due to no activity on 2023/05/03 07:41
upstream KCSAN: data-race in shmem_fallocate / shmem_fault (7) mm 7 330d 347d 0/28 auto-obsoleted due to no activity on 2024/01/31 00:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in shmem_fallocate / shmem_fault

write to 0xffff888124031d00 of 8 bytes by task 14148 on cpu 0:
 shmem_fallocate+0x22e/0x860 mm/shmem.c:3461
 vfs_fallocate+0x368/0x3b0 fs/open.c:327
 madvise_remove mm/madvise.c:1012 [inline]
 madvise_vma_behavior mm/madvise.c:1039 [inline]
 madvise_walk_vmas mm/madvise.c:1274 [inline]
 do_madvise+0x11c7/0x2660 mm/madvise.c:1461
 __do_sys_madvise mm/madvise.c:1477 [inline]
 __se_sys_madvise mm/madvise.c:1475 [inline]
 __x64_sys_madvise+0x61/0x70 mm/madvise.c:1475
 x64_sys_call+0x23ab/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:29
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888124031d00 of 8 bytes by task 14137 on cpu 1:
 shmem_fault+0x97/0x250 mm/shmem.c:2529
 __do_fault+0xb6/0x200 mm/memory.c:4882
 do_shared_fault mm/memory.c:5361 [inline]
 do_fault mm/memory.c:5435 [inline]
 do_pte_missing mm/memory.c:3965 [inline]
 handle_pte_fault mm/memory.c:5766 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0xc61/0x2aa0 mm/memory.c:6077
 faultin_page mm/gup.c:1187 [inline]
 __get_user_pages+0xf2c/0x2670 mm/gup.c:1485
 __get_user_pages_locked mm/gup.c:1751 [inline]
 faultin_page_range+0x352/0x5d0 mm/gup.c:1975
 madvise_populate mm/madvise.c:943 [inline]
 do_madvise+0x3dc/0x2660 mm/madvise.c:1458
 __do_sys_madvise mm/madvise.c:1477 [inline]
 __se_sys_madvise mm/madvise.c:1475 [inline]
 __x64_sys_madvise+0x61/0x70 mm/madvise.c:1475
 x64_sys_call+0x23ab/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:29
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffffc900101afca8

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 14137 Comm: syz.2.2712 Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 18:03 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_fallocate / shmem_fault
2024/11/09 15:01 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_fallocate / shmem_fault
2024/11/04 04:13 upstream a33ab3f94f51 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_fallocate / shmem_fault
2024/10/17 04:10 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_fallocate / shmem_fault
* Struck through repros no longer work on HEAD.