syzbot


KCSAN: data-race in mlock_folio / need_mlock_drain (9)

Status: moderation: reported on 2025/11/11 00:59
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+8fd073e91a422d3d5ae1@syzkaller.appspotmail.com
First crash: 110d, last: 9d20h
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
c942acc1-d0f8-485d-8985-258e273c4878 assessment-kcsan Benign: ✅  Confident: ✅  KCSAN: data-race in mlock_folio / need_mlock_drain (9) 2026/02/24 18:09 2026/02/24 18:09 2026/02/24 18:20 305c0ec5cd886e2d13738e28e1b2df9b0ec20fc9
b843700f-b123-4a14-ac38-bfc3222d1843 assessment-kcsan 💥 KCSAN: data-race in mlock_folio / need_mlock_drain (9) 2026/01/09 21:50 2026/01/09 21:50 2026/01/09 22:08 7519916073b761ced56a7b15fdeeb4674e8dc125 Error 429, Message: You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_requests_per_model_per_day, limit: 0, Status: RESOURCE_EXHAUSTED, Details: [map[@type:type.googleapis.com/google.rpc.Help links:[map[description:Learn more about Gemini API quotas url:https://ai.google.dev/gemini-api/docs/rate-limits]]] map[@type:type.googleapis.com/google.rpc.QuotaFailure violations:[map[quotaId:GenerateRequestsPerDayPerProjectPerModel quotaMetric:generativelanguage.googleapis.com/generate_requests_per_model_per_day]]] map[@type:type.googleapis.com/google.rpc.DebugInfo detail:[ORIGINAL ERROR] generic::resource_exhausted: You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_requests_per_model_per_day, limit: 0 [google.rpc.error_details_ext] { message: "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_requests_per_model_per_day, limit: 0" details { type_url: "type.googleapis.com/language_labs.genai.debug.GeminiApiDebugInfo" value: "RM\nK\nEgenerativelanguage.googleapis.com/generate_requests_per_model_per_day\030\000\"\000" } details { [type.googleapis.com/google.rpc.Help] { links { description: "Learn more about Gemini API quotas" url: "https://ai.google.dev/gemini-api/docs/rate-limits" } } } details { [type.googleapis.com/google.rpc.QuotaFailure] { violations { quota_metric: "generativelanguage.googleapis.com/generate_requests_per_model_per_day" quota_id: "GenerateRequestsPerDayPerProjectPerModel" } } } }]]
Similar bugs (8)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (5) mm 6 1 632d 632d 0/29 auto-obsoleted due to no activity on 2024/07/11 10:01
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (7) mm 6 3 258d 300d 0/29 auto-obsoleted due to no activity on 2025/08/10 18:09
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (2) mm 6 1 926d 926d 0/29 auto-obsoleted due to no activity on 2023/09/21 20:14
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (6) mm 6 13 416d 593d 0/29 auto-obsoleted due to no activity on 2025/03/06 02:54
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (3) mm 6 1 795d 795d 0/29 auto-obsoleted due to no activity on 2024/01/30 08:30
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (8) mm 6 1 187d 187d 0/29 auto-obsoleted due to no activity on 2025/10/20 23:51
upstream KCSAN: data-race in mlock_folio / need_mlock_drain (4) mm 6 1 676d 676d 0/29 auto-obsoleted due to no activity on 2024/05/28 09:55
upstream KCSAN: data-race in mlock_folio / need_mlock_drain mm 6 2 963d 964d 0/29 auto-obsoleted due to no activity on 2023/08/15 13:37

Sample crash report:
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in mlock_folio / need_mlock_drain

read-write to 0xffff888237c27210 of 1 bytes by task 16744 on cpu 0:
 folio_batch_add include/linux/pagevec.h:77 [inline]
 mlock_folio+0x14d/0x240 mm/mlock.c:257
 mlock_vma_folio mm/internal.h:1121 [inline]
 __folio_add_file_rmap mm/rmap.c:1680 [inline]
 folio_add_file_rmap_ptes+0x1d0/0x1e0 mm/rmap.c:1697
 set_pte_range+0x2c1/0x4f0 mm/memory.c:5516
 filemap_map_order0_folio mm/filemap.c:3856 [inline]
 filemap_map_pages+0x5c8/0xf10 mm/filemap.c:3921
 do_fault_around mm/memory.c:5748 [inline]
 do_read_fault mm/memory.c:5781 [inline]
 do_fault mm/memory.c:5924 [inline]
 do_pte_missing mm/memory.c:4469 [inline]
 handle_pte_fault mm/memory.c:6308 [inline]
 __handle_mm_fault mm/memory.c:6446 [inline]
 handle_mm_fault+0x1641/0x3020 mm/memory.c:6615
 faultin_page mm/gup.c:1126 [inline]
 __get_user_pages+0x1023/0x1ea0 mm/gup.c:1428
 populate_vma_page_range mm/gup.c:1860 [inline]
 __mm_populate+0x242/0x390 mm/gup.c:1963
 mm_populate include/linux/mm.h:3689 [inline]
 __do_sys_mlockall mm/mlock.c:769 [inline]
 __se_sys_mlockall+0x35f/0x3c0 mm/mlock.c:745
 __x64_sys_mlockall+0x1f/0x30 mm/mlock.c:745
 x64_sys_call+0xf90/0x3020 arch/x86/include/generated/asm/syscalls_64.h:152
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237c27210 of 1 bytes by task 12500 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:786 [inline]
 __lru_add_drain_all+0x273/0x450 mm/swap.c:877
 lru_add_drain_all+0x10/0x20 mm/swap.c:893
 invalidate_bdev+0x47/0x70 block/bdev.c:101
 ext4_put_super+0x624/0x7d0 fs/ext4/super.c:1353
 generic_shutdown_super+0xee/0x220 fs/super.c:646
 kill_block_super+0x2a/0x70 fs/super.c:1725
 ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7461
 deactivate_locked_super+0x75/0x1c0 fs/super.c:476
 deactivate_super+0x97/0xa0 fs/super.c:509
 cleanup_mnt+0x2bb/0x330 fs/namespace.c:1312
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1319
 task_work_run+0x130/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
 exit_to_user_mode_loop+0x1f4/0x6f0 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
 do_syscall_64+0x249/0x370 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x05 -> 0x1b

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12500 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/19 07:39 upstream 956b9cbd7f15 746545b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_folio / need_mlock_drain
2026/01/26 07:26 upstream 023777797472 55756628 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_folio / need_mlock_drain
2026/01/18 22:23 upstream e84d960149e7 20d37d28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_folio / need_mlock_drain
2025/12/08 06:56 upstream ba65a4e7120a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_folio / need_mlock_drain
2025/11/11 00:58 upstream 4ea7c1717f3f 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mlock_folio / need_mlock_drain
* Struck through repros no longer work on HEAD.