syzbot


KCSAN: data-race in munlock_page / need_mlock_page_drain (3)

Status: auto-closed as invalid on 2022/10/02 16:17
Subsystems: mm
[Documentation on labels]
First crash: 607d, last: 607d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in munlock_page / need_mlock_page_drain (4) mm 1 552d 552d 0/26 auto-obsoleted due to no activity on 2022/11/25 22:03
upstream KCSAN: data-race in munlock_page / need_mlock_page_drain mm 2 746d 749d 0/26 auto-closed as invalid on 2022/05/16 01:29
upstream KCSAN: data-race in munlock_page / need_mlock_page_drain (2) mm 2 680d 686d 0/26 auto-closed as invalid on 2022/07/21 00:35

Sample crash report:
EXT4-fs (loop3): unmounting filesystem.
==================================================================
BUG: KCSAN: data-race in munlock_page / need_mlock_page_drain

read-write to 0xffff888237c27f18 of 1 bytes by task 9970 on cpu 0:
 pagevec_add include/linux/pagevec.h:64 [inline]
 munlock_page+0x86/0x2a0 mm/mlock.c:302
 munlock_vma_page mm/internal.h:539 [inline]
 page_remove_rmap+0x17e/0x220 mm/rmap.c:1467
 zap_pte_range+0x6ca/0x1560 mm/memory.c:1454
 zap_pmd_range mm/memory.c:1575 [inline]
 zap_pud_range mm/memory.c:1604 [inline]
 zap_p4d_range mm/memory.c:1625 [inline]
 unmap_page_range+0x3ac/0x730 mm/memory.c:1646
 unmap_single_vma+0x157/0x230 mm/memory.c:1694
 unmap_vmas+0xdf/0x1a0 mm/memory.c:1731
 exit_mmap+0x11f/0x380 mm/mmap.c:3116
 __mmput+0x27/0x1b0 kernel/fork.c:1187
 mmput+0x3d/0x50 kernel/fork.c:1208
 exit_mm+0xdb/0x170 kernel/exit.c:510
 do_exit+0x525/0x16e0 kernel/exit.c:782
 do_group_exit+0xa5/0x160 kernel/exit.c:925
 get_signal+0xf54/0x1020 kernel/signal.c:2857
 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:166
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 ret_from_fork+0x15/0x30

read to 0xffff888237c27f18 of 1 bytes by task 1846 on cpu 1:
 pagevec_count include/linux/pagevec.h:51 [inline]
 need_mlock_page_drain+0x2c/0x50 mm/mlock.c:236
 cpu_needs_drain mm/swap.c:779 [inline]
 __lru_add_drain_all+0x328/0x450 mm/swap.c:867
 lru_add_drain_all+0xc/0x10 mm/swap.c:883
 invalidate_bdev+0x56/0x80 block/bdev.c:85
 ext4_put_super+0x510/0x810 fs/ext4/super.c:1279
 generic_shutdown_super+0xd5/0x240 fs/super.c:491
 kill_block_super+0x4a/0x90 fs/super.c:1427
 deactivate_locked_super+0x6a/0xb0 fs/super.c:332
 deactivate_super+0x85/0x90 fs/super.c:363
 cleanup_mnt+0x2b6/0x320 fs/namespace.c:1186
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1193
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0b -> 0x04

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1846 Comm: syz-executor.3 Not tainted 6.0.0-rc2-syzkaller-00283-g10d4879f9ef0-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.
EXT4-fs (loop3): unmounting filesystem.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/28 16:15 upstream 10d4879f9ef0 07177916 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in munlock_page / need_mlock_page_drain
* Struck through repros no longer work on HEAD.