syzbot


KCSAN: data-race in munlock_folio / need_mlock_drain (2)

Status: auto-obsoleted due to no activity on 2023/11/07 10:03
Subsystems: mm
[Documentation on labels]
First crash: 290d, last: 290d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in munlock_folio / need_mlock_drain mm 1 444d 444d 0/27 auto-obsoleted due to no activity on 2023/06/05 22:24
upstream KCSAN: data-race in munlock_folio / need_mlock_drain (5) mm 6 7d04h 47d 0/27 moderation: reported on 2024/06/02 17:40
upstream KCSAN: data-race in munlock_folio / need_mlock_drain (4) mm 1 84d 84d 0/27 auto-obsoleted due to no activity on 2024/05/31 11:19
upstream KCSAN: data-race in munlock_folio / need_mlock_drain (3) mm 2 186d 215d 0/27 auto-obsoleted due to no activity on 2024/02/18 23:01

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

read-write to 0xffff888237c29f28 of 1 bytes by task 3307 on cpu 0:
 folio_batch_add include/linux/pagevec.h:74 [inline]
 munlock_folio+0x3c/0x120 mm/mlock.c:302
 munlock_vma_folio mm/internal.h:625 [inline]
 page_remove_rmap+0x1fe/0x2b0 mm/rmap.c:1466
 zap_pte_range mm/memory.c:1456 [inline]
 zap_pmd_range mm/memory.c:1573 [inline]
 zap_pud_range mm/memory.c:1602 [inline]
 zap_p4d_range mm/memory.c:1623 [inline]
 unmap_page_range+0xd3f/0x1db0 mm/memory.c:1644
 unmap_single_vma+0x142/0x1d0 mm/memory.c:1690
 unmap_vmas+0xf6/0x1a0 mm/memory.c:1731
 exit_mmap+0x167/0x640 mm/mmap.c:3210
 __mmput+0x28/0x1c0 kernel/fork.c:1349
 mmput+0x4c/0x60 kernel/fork.c:1371
 exit_mm+0xe3/0x180 kernel/exit.c:567
 do_exit+0x580/0x1660 kernel/exit.c:861
 do_group_exit+0x141/0x150 kernel/exit.c:1024
 __do_sys_exit_group kernel/exit.c:1035 [inline]
 __se_sys_exit_group kernel/exit.c:1033 [inline]
 __x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1033
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888237c29f28 of 1 bytes by task 3327 on cpu 1:
 folio_batch_count include/linux/pagevec.h:53 [inline]
 need_mlock_drain+0x30/0x50 mm/mlock.c:236
 cpu_needs_drain mm/swap.c:801 [inline]
 __lru_add_drain_all+0x240/0x420 mm/swap.c:889
 lru_add_drain_all+0x10/0x20 mm/swap.c:905
 invalidate_bdev+0x54/0x70 block/bdev.c:86
 __ext4_fill_super fs/ext4/super.c:5678 [inline]
 ext4_fill_super+0x16ef/0x3940 fs/ext4/super.c:5703
 get_tree_bdev+0x272/0x300 fs/super.c:1577
 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5735
 vfs_get_tree+0x51/0x1b0 fs/super.c:1750
 do_new_mount+0x203/0x660 fs/namespace.c:3335
 path_mount+0x496/0xb30 fs/namespace.c:3662
 do_mount fs/namespace.c:3675 [inline]
 __do_sys_mount fs/namespace.c:3884 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3861
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3861
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x01 -> 0x06

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3327 Comm: syz-executor.5 Not tainted 6.6.0-rc4-syzkaller-00012-gce36c8b14987 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/03 09:52 upstream ce36c8b14987 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in munlock_folio / need_mlock_drain
* Struck through repros no longer work on HEAD.