syzbot


upstream test error: WARNING: locking bug in __rmqueue_pcplist

Status: upstream: reported on 2024/12/07 17:47
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+4dbab151c88eb889644b@syzkaller.appspotmail.com
First crash: 51d, last: 5d22h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] upstream test error: WARNING: locking bug in __rmqueue_pcplist 0 (1) 2024/12/07 17:47

Sample crash report:
=============================
[ BUG: Invalid wait context ]
6.13.0-rc7-syzkaller-00189-g595523945be0 #0 Not tainted
-----------------------------
syz.4.145/5994 is trying to lock:
ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: rmqueue_bulk mm/page_alloc.c:2309 [inline]
ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: __rmqueue_pcplist+0x6bb/0x1600 mm/page_alloc.c:3003
other info that might help us debug this:
context-{2:2}
1 lock held by syz.4.145/5994:
 #0: ffff8880b8744d98 (&pcp->lock){+.+.}-{3:3}, at: spin_trylock include/linux/spinlock.h:361 [inline]
 #0: ffff8880b8744d98 (&pcp->lock){+.+.}-{3:3}, at: rmqueue_pcplist mm/page_alloc.c:3032 [inline]
 #0: ffff8880b8744d98 (&pcp->lock){+.+.}-{3:3}, at: rmqueue mm/page_alloc.c:3076 [inline]
 #0: ffff8880b8744d98 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x350/0x2f80 mm/page_alloc.c:3473
stack backtrace:
CPU: 1 UID: 0 PID: 5994 Comm: syz.4.145 Not tainted 6.13.0-rc7-syzkaller-00189-g595523945be0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
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:2309 [inline]
 __rmqueue_pcplist+0x6bb/0x1600 mm/page_alloc.c:3003
 rmqueue_pcplist mm/page_alloc.c:3045 [inline]
 rmqueue mm/page_alloc.c:3076 [inline]
 get_page_from_freelist+0x3d2/0x2f80 mm/page_alloc.c:3473
 __alloc_pages_noprof+0x223/0x25b0 mm/page_alloc.c:4753
 alloc_pages_mpol_noprof+0x2c8/0x620 mm/mempolicy.c:2269
 stack_depot_save_flags+0x8aa/0x9c0 lib/stackdepot.c:627
 kasan_save_stack+0x42/0x60 mm/kasan/common.c:48
 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:544
 task_work_add+0xc0/0x3b0 kernel/task_work.c:77
 __run_posix_cpu_timers kernel/time/posix-cpu-timers.c:1223 [inline]
 run_posix_cpu_timers+0x69f/0x7d0 kernel/time/posix-cpu-timers.c:1422
 update_process_times+0x1a1/0x2d0 kernel/time/timer.c:2526
 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+0x5fe/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+0x112/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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 76 32 4c f6 48 89 df e8 ce b1 4c f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 <bf> 01 00 00 00 e8 c5 96 3d f6 65 8b 05 c6 41 d9 74 85 c0 74 16 5b
RSP: 0018:ffffc90003257d98 EFLAGS: 00000246
RAX: 0000000000000002 RBX: ffff888030541280 RCX: 1ffffffff20be629
RDX: 0000000000000000 RSI: ffffffff8b6cd9e0 RDI: ffffffff8bd1e120
RBP: 0000000000000293 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff905f7497 R11: ffffffff961f1b80 R12: 1ffff9200064afb7
R13: ffffffffffffffff R14: ffff88802e066540 R15: ffff8880227c8608
 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
 unlock_task_sighand include/linux/sched/signal.h:751 [inline]
 update_rlimit_cpu+0x133/0x1b0 kernel/time/posix-cpu-timers.c:50
 do_prlimit+0x3ce/0x6d0 kernel/sys.c:1521
 __do_sys_setrlimit kernel/sys.c:1746 [inline]
 __se_sys_setrlimit kernel/sys.c:1740 [inline]
 __x64_sys_setrlimit+0xf3/0x160 kernel/sys.c:1740
 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:0x7f881d985d29
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcb44f1e78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a0
RAX: ffffffffffffffda RBX: 00007f881db75fa0 RCX: 00007f881d985d29
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 00007f881da01b08 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f881db75fa0 R14: 00007f881db75fa0 R15: 0000000000001554
 </TASK>
----------------
Code disassembly (best guess):
   0:	f5                   	cmc
   1:	53                   	push   %rbx
   2:	48 8b 74 24 10       	mov    0x10(%rsp),%rsi
   7:	48 89 fb             	mov    %rdi,%rbx
   a:	48 83 c7 18          	add    $0x18,%rdi
   e:	e8 76 32 4c f6       	call   0xf64c3289
  13:	48 89 df             	mov    %rbx,%rdi
  16:	e8 ce b1 4c f6       	call   0xf64cb1e9
  1b:	f7 c5 00 02 00 00    	test   $0x200,%ebp
  21:	75 23                	jne    0x46
  23:	9c                   	pushf
  24:	58                   	pop    %rax
  25:	f6 c4 02             	test   $0x2,%ah
  28:	75 37                	jne    0x61
* 2a:	bf 01 00 00 00       	mov    $0x1,%edi <-- trapping instruction
  2f:	e8 c5 96 3d f6       	call   0xf63d96f9
  34:	65 8b 05 c6 41 d9 74 	mov    %gs:0x74d941c6(%rip),%eax        # 0x74d94201
  3b:	85 c0                	test   %eax,%eax
  3d:	74 16                	je     0x55
  3f:	5b                   	pop    %rbx

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/18 03:58 upstream 595523945be0 f2cb035c .config console log report [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root upstream test error: WARNING: locking bug in __rmqueue_pcplist
2024/12/11 23:02 upstream 231825b2e1ff 6f1b0fa8 .config console log report [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto upstream test error: WARNING: locking bug in __rmqueue_pcplist
2024/12/03 17:37 upstream ceb8bf2ceaa7 d4480042 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-compat upstream test error: WARNING: locking bug in __rmqueue_pcplist
* Struck through repros no longer work on HEAD.