syzbot


KCSAN: data-race in mlock_new_folio / need_mlock_drain (3)

Status: moderation: reported on 2024/04/11 03:51
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+68fbd83d6f243168acea@syzkaller.appspotmail.com
First crash: 224d, last: 1d03h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mlock_new_folio / need_mlock_drain mm 2 413d 437d 0/28 auto-obsoleted due to no activity on 2023/11/08 14:06
upstream KCSAN: data-race in mlock_new_folio / need_mlock_drain (2) mm 8 263d 347d 0/28 auto-obsoleted due to no activity on 2024/04/07 03:38

Sample crash report:
==================================================================
BUG: KCSAN: data-race in mlock_new_folio / need_mlock_drain

read-write to 0xffff888237d2b5a0 of 1 bytes by task 14231 on cpu 1:
 folio_batch_add include/linux/pagevec.h:77 [inline]
 mlock_new_folio+0x114/0x200 mm/mlock.c:280
 folio_add_lru_vma+0x5d/0x60 mm/swap.c:530
 do_anonymous_page mm/memory.c:4831 [inline]
 do_pte_missing mm/memory.c:3963 [inline]
 handle_pte_fault mm/memory.c:5766 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0x24bf/0x2aa0 mm/memory.c:6077
 faultin_page mm/gup.c:1187 [inline]
 __get_user_pages+0xf2c/0x2670 mm/gup.c:1485
 populate_vma_page_range mm/gup.c:1923 [inline]
 __mm_populate+0x25b/0x3b0 mm/gup.c:2026
 mm_populate include/linux/mm.h:3383 [inline]
 __do_sys_mremap mm/mremap.c:1187 [inline]
 __se_sys_mremap+0xdf7/0xec0 mm/mremap.c:987
 __x64_sys_mremap+0x67/0x80 mm/mremap.c:987
 x64_sys_call+0x27e8/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:26
 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 0xffff888237d2b5a0 of 1 bytes by task 14239 on cpu 0:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 need_mlock_drain+0x30/0x50 mm/mlock.c:235
 cpu_needs_drain mm/swap.c:778 [inline]
 __lru_add_drain_all+0x22a/0x3f0 mm/swap.c:866
 lru_cache_disable+0x1f/0x30 mm/swap.c:919
 do_pages_move mm/migrate.c:2300 [inline]
 kernel_move_pages mm/migrate.c:2554 [inline]
 __do_sys_move_pages mm/migrate.c:2568 [inline]
 __se_sys_move_pages+0x2a6/0x14b0 mm/migrate.c:2563
 __x64_sys_move_pages+0x78/0x90 mm/migrate.c:2563
 x64_sys_call+0x179b/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:280
 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: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 14239 Comm: syz.3.3912 Not tainted 6.12.0-syzkaller-00971-g158f238aa69d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (41):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 02:55 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/11/18 09:57 upstream adc218676eef cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/11/11 06:56 upstream a9cda7c0ffed 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/10/19 09:23 upstream b04ae0f45168 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/10/06 18:11 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/10/06 02:03 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/09/29 06:40 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/09/14 02:57 upstream 196145c606d0 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/09/06 17:25 upstream b831f83e40a2 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/09/02 20:46 upstream 67784a74e258 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/28 18:46 upstream 86987d84b968 ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/17 18:28 upstream e5fa841af679 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/17 13:52 upstream 85652baa895b dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/06 16:49 upstream eb5e56d14912 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/03 04:25 upstream 1c4246294c98 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/02 04:21 upstream 183d46ff422e 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/08/01 11:10 upstream 21b136cc63d2 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/30 18:13 upstream 94ede2a3e913 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/30 11:28 upstream 94ede2a3e913 5187fc86 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/25 03:12 upstream d1e9a63dcd72 d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/23 12:23 upstream 66ebbdfdeb09 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/22 16:44 upstream 933069701c1b df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/20 17:56 upstream 3c3ff7be9729 b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/09 17:26 upstream 34afb82a3c67 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/05 15:08 upstream 661e504db04c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/04 14:15 upstream 795c58e4c7fc 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/04 06:26 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/03 09:14 upstream e9d22f7a6655 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/07/02 11:11 upstream 1dfe225e9af5 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/24 14:28 upstream f2661062f16b edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/24 02:33 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/17 22:20 upstream 6226e74900d7 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/12 13:59 upstream 2ef5971ff345 f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/11 14:01 upstream 83a7eefedc9b b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/10 06:56 upstream 83a7eefedc9b 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/06/02 03:51 upstream 89be4025b0db 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/05/24 08:04 upstream 2a8120d7b482 8f98448e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/04/28 12:26 upstream 2c8159388952 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/04/27 02:26 upstream 5eb4573ea63d 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/04/24 11:05 upstream 9d1ddab261f3 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
2024/04/11 03:50 upstream 9875c0beb8ad 33b9e058 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_new_folio / need_mlock_drain
* Struck through repros no longer work on HEAD.