syzbot


KCSAN: data-race in munlock_folio / need_mlock_drain

Status: auto-obsoleted due to no activity on 2023/06/05 22:24
Subsystems: mm
[Documentation on labels]
First crash: 444d, last: 444d
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 (2) mm 1 290d 290d 0/27 auto-obsoleted due to no activity on 2023/11/07 10:03
upstream KCSAN: data-race in munlock_folio / need_mlock_drain (5) mm 6 7d03h 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:
EXT4-fs (loop3): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in munlock_folio / need_mlock_drain

read-write to 0xffff888237c2a020 of 1 bytes by task 4570 on cpu 0:
 folio_batch_add include/linux/pagevec.h:126 [inline]
 munlock_folio+0x3c/0x120 mm/mlock.c:302
 munlock_vma_folio mm/internal.h:604 [inline]
 page_remove_rmap+0x1c6/0x270 mm/rmap.c:1445
 zap_pte_range mm/memory.c:1435 [inline]
 zap_pmd_range mm/memory.c:1563 [inline]
 zap_pud_range mm/memory.c:1592 [inline]
 zap_p4d_range mm/memory.c:1613 [inline]
 unmap_page_range+0xdeb/0x1e60 mm/memory.c:1634
 unmap_single_vma+0x142/0x1d0 mm/memory.c:1680
 unmap_vmas+0x157/0x200 mm/memory.c:1719
 exit_mmap+0x15b/0x5e0 mm/mmap.c:3111
 __mmput+0x28/0x1c0 kernel/fork.c:1351
 mmput+0x49/0x60 kernel/fork.c:1373
 exit_mm+0xe4/0x180 kernel/exit.c:564
 do_exit+0x558/0x1660 kernel/exit.c:858
 do_group_exit+0x101/0x150 kernel/exit.c:1021
 get_signal+0xeb1/0xff0 kernel/signal.c:2874
 arch_do_signal_or_restart+0x89/0x2a0 arch/x86/kernel/signal.c:306
 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888237c2a020 of 1 bytes by task 3084 on cpu 1:
 folio_batch_count include/linux/pagevec.h:105 [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+0x5a/0x80 block/bdev.c:86
 ext4_put_super+0x502/0x800 fs/ext4/super.c:1327
 generic_shutdown_super+0xd9/0x260 fs/super.c:500
 kill_block_super+0x4e/0xa0 fs/super.c:1407
 deactivate_locked_super+0x6b/0xd0 fs/super.c:331
 deactivate_super+0x9b/0xb0 fs/super.c:362
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1177
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1184
 task_work_run+0x123/0x160 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xd1/0xe0 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x07 -> 0x0d

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3084 Comm: syz-executor.3 Not tainted 6.3.0-syzkaller-12378-gc8c655c34e33 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/01 22:20 upstream c8c655c34e33 62df2017 .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.