syzbot


KCSAN: data-race in munlock_vma_pages_range / page_mlock_one

Status: auto-closed as invalid on 2021/12/01 19:50
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 419d, last: 404d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in munlock_vma_pages_range / page_mlock_one

write to 0xffff88812ff07410 of 8 bytes by task 18506 on cpu 0:
 munlock_vma_pages_range+0x52/0x450 mm/mlock.c:424
 munlock_vma_pages_all mm/internal.h:358 [inline]
 unlock_range mm/mmap.c:2784 [inline]
 exit_mmap+0x19d/0x470 mm/mmap.c:3158
 __mmput+0x27/0x1d0 kernel/fork.c:1115
 mmput+0x3d/0x50 kernel/fork.c:1136
 exit_mm+0x2ec/0x3e0 kernel/exit.c:501
 do_exit+0x3ef/0x14a0 kernel/exit.c:812
 do_group_exit+0xce/0x1a0 kernel/exit.c:922
 get_signal+0xf63/0x15a0 kernel/signal.c:2855
 arch_do_signal_or_restart+0x8c/0x280 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x109/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88812ff07410 of 8 bytes by task 19164 on cpu 1:
 page_mlock_one+0xa4/0x140 mm/rmap.c:1989
 rmap_walk_file+0x2f2/0x3d0 mm/rmap.c:2352
 rmap_walk mm/rmap.c:2370 [inline]
 page_mlock+0x8f/0xd0 mm/rmap.c:2033
 __munlock_isolated_page mm/mlock.c:122 [inline]
 __munlock_pagevec+0x94d/0xb40 mm/mlock.c:322
 munlock_vma_pages_range+0x3fd/0x450 mm/mlock.c:475
 munlock_vma_pages_all mm/internal.h:358 [inline]
 unlock_range mm/mmap.c:2784 [inline]
 exit_mmap+0x19d/0x470 mm/mmap.c:3158
 __mmput+0x27/0x1d0 kernel/fork.c:1115
 mmput+0x3d/0x50 kernel/fork.c:1136
 exit_mm+0x2ec/0x3e0 kernel/exit.c:501
 do_exit+0x3ef/0x14a0 kernel/exit.c:812
 do_group_exit+0xce/0x1a0 kernel/exit.c:922
 get_signal+0xf63/0x15a0 kernel/signal.c:2855
 arch_do_signal_or_restart+0x8c/0x280 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x109/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000082075 -> 0x0000000000000075

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19164 Comm: syz-executor.5 Not tainted 5.15.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/10/27 19:45 upstream d25f27432f80 be531bb4 .config log report info KCSAN: data-race in munlock_vma_pages_range / page_mlock_one
ci2-upstream-kcsan-gce 2021/10/13 03:13 upstream f4d0cc426f77 08362356 .config log report info KCSAN: data-race in munlock_vma_pages_range / page_mlock_one
* Struck through repros no longer work on HEAD.