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: 237d, last: 9d14h
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 426d 450d 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 276d 360d 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 0xffff888237c2b4a0 of 1 bytes by task 17754 on cpu 0:
 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:499
 do_anonymous_page mm/memory.c:4856 [inline]
 do_pte_missing mm/memory.c:3977 [inline]
 handle_pte_fault mm/memory.c:5801 [inline]
 __handle_mm_fault mm/memory.c:5944 [inline]
 handle_mm_fault+0x24d8/0x2ac0 mm/memory.c:6112
 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:3385 [inline]
 __do_sys_mremap mm/mremap.c:1213 [inline]
 __se_sys_mremap+0xbf6/0xf10 mm/mremap.c:1015
 __x64_sys_mremap+0x67/0x80 mm/mremap.c:1015
 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 0xffff888237c2b4a0 of 1 bytes by task 15743 on cpu 1:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 need_mlock_drain+0x30/0x50 mm/mlock.c:235
 cpu_needs_drain mm/swap.c:747 [inline]
 __lru_add_drain_all+0x22a/0x3f0 mm/swap.c:835
 lru_add_drain_all+0x10/0x20 mm/swap.c:851
 invalidate_bdev+0x47/0x70 block/bdev.c:101
 ext4_put_super+0x571/0x840 fs/ext4/super.c:1356
 generic_shutdown_super+0xe5/0x220 fs/super.c:642
 kill_block_super+0x2a/0x70 fs/super.c:1710
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7379
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1373
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1380
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xa8/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x1c -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 15743 Comm: syz-executor Not tainted 6.12.0-syzkaller-09073-g9f16d5e6f220 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (42):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/24 13:52 upstream 9f16d5e6f220 68da6d95 .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/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.