syzbot


KCSAN: data-race in mlock_folio / need_mlock_page_drain

Status: auto-closed as invalid on 2022/07/18 06:52
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 172d, last: 172d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mlock_folio / need_mlock_page_drain (2) 1 47d 47d 0/24 auto-obsoleted due to no activity on 2022/11/20 16:21

Sample crash report:
==================================================================
BUG: KCSAN: data-race in mlock_folio / need_mlock_page_drain

read-write to 0xffff888237d27ec0 of 1 bytes by task 6823 on cpu 1:
 pagevec_add include/linux/pagevec.h:75 [inline]
 mlock_folio+0x1fc/0x2d0 mm/mlock.c:258
 mlock_vma_folio mm/internal.h:524 [inline]
 mlock_vma_page mm/internal.h:530 [inline]
 page_add_file_rmap+0x10b/0x1b0 mm/rmap.c:1336
 do_set_pte+0x258/0x500 mm/memory.c:4309
 filemap_map_pages+0x675/0xae0 mm/filemap.c:3392
 do_fault_around mm/memory.c:4480 [inline]
 do_read_fault mm/memory.c:4506 [inline]
 do_fault+0x433/0xb20 mm/memory.c:4640
 handle_pte_fault mm/memory.c:4903 [inline]
 __handle_mm_fault mm/memory.c:5042 [inline]
 handle_mm_fault+0x889/0xa90 mm/memory.c:5140
 faultin_page mm/gup.c:953 [inline]
 __get_user_pages+0x34a/0xbf0 mm/gup.c:1174
 populate_vma_page_range mm/gup.c:1518 [inline]
 __mm_populate+0x26e/0x3a0 mm/gup.c:1631
 mm_populate include/linux/mm.h:2706 [inline]
 __do_sys_mlockall+0x24b/0x2d0 mm/mlock.c:720
 __se_sys_mlockall mm/mlock.c:696 [inline]
 __x64_sys_mlockall+0x1a/0x20 mm/mlock.c:696
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff888237d27ec0 of 1 bytes by task 6814 on cpu 0:
 pagevec_count include/linux/pagevec.h:62 [inline]
 need_mlock_page_drain+0x2c/0x50 mm/mlock.c:236
 __lru_add_drain_all+0x24c/0x3e0 mm/swap.c:832
 lru_cache_disable+0x1b/0x20 mm/swap.c:886
 do_mbind+0x416/0x8b0 mm/mempolicy.c:1292
 kernel_mbind mm/mempolicy.c:1470 [inline]
 __do_sys_mbind mm/mempolicy.c:1548 [inline]
 __se_sys_mbind+0x13b/0x3f0 mm/mempolicy.c:1544
 __x64_sys_mbind+0x74/0x80 mm/mempolicy.c:1544
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6814 Comm: syz-executor.5 Not tainted 5.19.0-rc1-syzkaller-00336-g997952851843-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/13 06:42 upstream 997952851843 0d5abf15 .config log report info KCSAN: data-race in mlock_folio / need_mlock_page_drain
* Struck through repros no longer work on HEAD.