syzbot


WARNING: locking bug in __rmqueue_pcplist

Status: upstream: reported syz repro on 2024/11/03 10:46
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+39f85d612b7c20d8db48@syzkaller.appspotmail.com
First crash: 21d, last: now
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] kasan: Remove kasan_record_aux_stack_noalloc(). 4 (4) 2024/11/19 19:36
[syzbot] [mm?] WARNING: locking bug in __rmqueue_pcplist 7 (8) 2024/11/13 14:18

Sample crash report:
=============================
[ BUG: Invalid wait context ]
6.12.0-syzkaller-01782-gbf9aa14fc523 #0 Not tainted
-----------------------------
sshd/5863 is trying to lock:
ffff88807ffd7298 (&zone->lock){..-.}-{3:3}, at: rmqueue_bulk mm/page_alloc.c:2307 [inline]
ffff88807ffd7298 (&zone->lock){..-.}-{3:3}, at: __rmqueue_pcplist+0x6bb/0x1600 mm/page_alloc.c:3001
other info that might help us debug this:
context-{2:2}
3 locks held by sshd/5863:
 #0: ffff88802a51ed20 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_downgrade include/linux/mmap_lock.h:138 [inline]
 #0: ffff88802a51ed20 (&mm->mmap_lock){++++}-{4:4}, at: vms_complete_munmap_vmas+0x710/0x980 mm/vma.c:1139
 #1: ffff88802b43eed8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598
 #2: ffff88802b4450d8 (&pcp->lock){+.+.}-{3:3}, at: spin_trylock include/linux/spinlock.h:361 [inline]
 #2: ffff88802b4450d8 (&pcp->lock){+.+.}-{3:3}, at: rmqueue_pcplist mm/page_alloc.c:3030 [inline]
 #2: ffff88802b4450d8 (&pcp->lock){+.+.}-{3:3}, at: rmqueue mm/page_alloc.c:3074 [inline]
 #2: ffff88802b4450d8 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x350/0x2f80 mm/page_alloc.c:3471
stack backtrace:
CPU: 0 UID: 0 PID: 5863 Comm: sshd Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline]
 check_wait_context kernel/locking/lockdep.c:4898 [inline]
 __lock_acquire+0x878/0x3c40 kernel/locking/lockdep.c:5176
 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
 rmqueue_bulk mm/page_alloc.c:2307 [inline]
 __rmqueue_pcplist+0x6bb/0x1600 mm/page_alloc.c:3001
 rmqueue_pcplist mm/page_alloc.c:3043 [inline]
 rmqueue mm/page_alloc.c:3074 [inline]
 get_page_from_freelist+0x3d2/0x2f80 mm/page_alloc.c:3471
 __alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751
 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
 stack_depot_save_flags+0x566/0x900 lib/stackdepot.c:627
 kasan_save_stack+0x42/0x60 mm/kasan/common.c:48
 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541
 task_work_add+0xc0/0x3b0 kernel/task_work.c:77
 task_tick_numa kernel/sched/fair.c:3607 [inline]
 task_tick_fair+0x524/0x8e0 kernel/sched/fair.c:13054
 sched_tick+0x1dd/0x4f0 kernel/sched/core.c:5652
 update_process_times+0x19c/0x2d0 kernel/time/timer.c:2524
 tick_sched_handle kernel/time/tick-sched.c:276 [inline]
 tick_nohz_handler+0x376/0x530 kernel/time/tick-sched.c:297
 __run_hrtimer kernel/time/hrtimer.c:1739 [inline]
 __hrtimer_run_queues+0x5fb/0xae0 kernel/time/hrtimer.c:1803
 hrtimer_interrupt+0x392/0x8e0 kernel/time/hrtimer.c:1865
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline]
 __sysvec_apic_timer_interrupt+0x10f/0x400 arch/x86/kernel/apic/apic.c:1055
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
 sysvec_apic_timer_interrupt+0x9f/0xc0 arch/x86/kernel/apic/apic.c:1049
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:folios_put_refs+0x25f/0x7b0 mm/swap.c:953
Code: d8 48 c1 e8 03 42 80 3c 28 00 0f 85 7a 04 00 00 48 8b 03 bf 04 00 00 00 48 c1 e8 37 83 e0 07 89 c6 89 44 24 08 e8 01 90 c6 ff <8b> 44 24 08 83 f8 04 0f 84 97 fe ff ff e8 af 8d c6 ff 48 8d 7b 34
RSP: 0018:ffffc9000dcef570 EFLAGS: 00000293
RAX: 0000000000000000 RBX: ffffea0001fbfa40 RCX: ffffffff81c63dbf
RDX: ffff888024d20000 RSI: 0000000000000004 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000004
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc9000dcef6a0
R13: dffffc0000000000 R14: ffffc9000dcef740 R15: 0000000000000001
 free_pages_and_swap_cache+0x36d/0x510 mm/swap_state.c:332
 __tlb_batch_free_encoded_pages+0xf9/0x290 mm/mmu_gather.c:136
 tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:366 [inline]
 tlb_flush_mmu mm/mmu_gather.c:373 [inline]
 tlb_finish_mmu+0x168/0x7b0 mm/mmu_gather.c:465
 vms_clear_ptes+0x565/0x780 mm/vma.c:1102
 vms_complete_munmap_vmas+0x1ce/0x980 mm/vma.c:1144
 do_vmi_align_munmap+0x619/0x890 mm/vma.c:1353
 do_vmi_munmap+0x20b/0x3e0 mm/vma.c:1401
 __vm_munmap+0x14f/0x340 mm/mmap.c:1623
 __do_sys_munmap mm/mmap.c:1640 [inline]
 __se_sys_munmap mm/mmap.c:1637 [inline]
 __x64_sys_munmap+0x59/0x80 mm/mmap.c:1637
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff84b4df817
Code: ff ff 76 10 48 8b 15 10 36 0d 00 f7 d8 64 89 02 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 35 0d 00 f7 d8 64 89 01 48
RSP: 002b:00007ffc822ac258 EFLAGS: 00000207 ORIG_RAX: 000000000000000b
RAX: ffffffffffffffda RBX: fffffffffffffe98 RCX: 00007ff84b4df817
RDX: 0000000000000000 RSI: 00000000002e5000 RDI: 00007ff84adef000
RBP: 0000000000000020 R08: 00007ff84adef000 R09: 0000000000000000
R10: 0000000000000022 R11: 0000000000000207 R12: 00007ff84adef000
R13: 00007ff84adef010 R14: 00000000002e4000 R15: 00007ffc822ac438
 </TASK>
----------------
Code disassembly (best guess):
   0:	d8 48 c1             	fmuls  -0x3f(%rax)
   3:	e8 03 42 80 3c       	call   0x3c80420b
   8:	28 00                	sub    %al,(%rax)
   a:	0f 85 7a 04 00 00    	jne    0x48a
  10:	48 8b 03             	mov    (%rbx),%rax
  13:	bf 04 00 00 00       	mov    $0x4,%edi
  18:	48 c1 e8 37          	shr    $0x37,%rax
  1c:	83 e0 07             	and    $0x7,%eax
  1f:	89 c6                	mov    %eax,%esi
  21:	89 44 24 08          	mov    %eax,0x8(%rsp)
  25:	e8 01 90 c6 ff       	call   0xffc6902b
* 2a:	8b 44 24 08          	mov    0x8(%rsp),%eax <-- trapping instruction
  2e:	83 f8 04             	cmp    $0x4,%eax
  31:	0f 84 97 fe ff ff    	je     0xfffffece
  37:	e8 af 8d c6 ff       	call   0xffc68deb
  3c:	48 8d 7b 34          	lea    0x34(%rbx),%rdi

Crashes (205):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 19:41 upstream bf9aa14fc523 4fca1650 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: locking bug in __rmqueue_pcplist
2024/11/01 00:47 linux-next f9f24ca362a4 96eb609f .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/21 02:56 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING: locking bug in __rmqueue_pcplist
2024/11/21 01:52 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 21:53 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 20:28 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING: locking bug in __rmqueue_pcplist
2024/11/20 12:45 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 11:20 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING: locking bug in __rmqueue_pcplist
2024/11/20 08:03 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING: locking bug in __rmqueue_pcplist
2024/11/20 05:46 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING: locking bug in __rmqueue_pcplist
2024/11/21 06:08 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in __rmqueue_pcplist
2024/11/20 23:23 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in __rmqueue_pcplist
2024/11/20 17:13 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in __rmqueue_pcplist
2024/11/20 14:12 upstream bf9aa14fc523 4fca1650 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 11:44 upstream bf9aa14fc523 7d02db5a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 06:55 upstream bf9aa14fc523 7d02db5a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: locking bug in __rmqueue_pcplist
2024/11/21 00:39 upstream 43fb83c17ba2 4b25d554 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: locking bug in __rmqueue_pcplist
2024/11/20 18:15 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: locking bug in __rmqueue_pcplist
2024/11/20 10:18 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: locking bug in __rmqueue_pcplist
2024/11/19 23:58 upstream a5c93bfec0be 4dfba277 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64 WARNING: locking bug in __rmqueue_pcplist
2024/11/21 04:01 linux-next ac24e26aa08f 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 09:10 linux-next ac24e26aa08f 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 04:12 linux-next 414c97c966b6 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/20 01:41 linux-next 414c97c966b6 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/19 22:46 linux-next 414c97c966b6 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/19 08:11 linux-next 414c97c966b6 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/19 08:01 linux-next 414c97c966b6 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/19 06:11 linux-next ae58226b89ac 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/19 04:21 linux-next ae58226b89ac 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/18 21:24 linux-next ae58226b89ac 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/18 15:21 linux-next ae58226b89ac 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/18 13:13 linux-next ae58226b89ac 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/18 11:11 linux-next ae58226b89ac cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/13 03:26 linux-next 929beafbe7ac 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 22:42 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 21:24 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 19:05 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 17:03 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 15:00 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 07:46 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 05:01 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/12 04:51 linux-next 929beafbe7ac 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 21:13 linux-next 929beafbe7ac 97fe5517 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 19:50 linux-next 929beafbe7ac 97fe5517 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 12:26 linux-next 929beafbe7ac 97fe5517 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 08:07 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 06:29 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 05:22 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/11 01:58 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/10 19:59 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/10 13:20 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/10 12:01 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/10 05:31 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
2024/11/10 03:50 linux-next 929beafbe7ac 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in __rmqueue_pcplist
* Struck through repros no longer work on HEAD.