============================= [ BUG: Invalid wait context ] 6.13.0-syzkaller-06167-g0afd22092df4 #0 Not tainted ----------------------------- syz.4.78/6114 is trying to lock: ffffffff8e3a7e78 (stack_list_lock){-.-.}-{3:3}, at: add_stack_record_to_list mm/page_owner.c:182 [inline] ffffffff8e3a7e78 (stack_list_lock){-.-.}-{3:3}, at: inc_stack_record_count mm/page_owner.c:214 [inline] ffffffff8e3a7e78 (stack_list_lock){-.-.}-{3:3}, at: __set_page_owner+0x3ea/0x560 mm/page_owner.c:329 other info that might help us debug this: context-{2:2} 2 locks held by syz.4.78/6114: #0: ffffffff8e1ab8a0 (console_lock){+.+.}-{0:0}, at: _printk+0xc8/0x100 kernel/printk/printk.c:2457 #1: ffffffff8e1ab910 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:342 [inline] #1: ffffffff8e1ab910 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:304 [inline] #1: ffffffff8e1ab910 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:288 [inline] #1: ffffffff8e1ab910 (console_srcu){....}-{0:0}, at: console_flush_all+0x159/0xc60 kernel/printk/printk.c:3187 stack backtrace: CPU: 0 UID: 0 PID: 6114 Comm: syz.4.78 Not tainted 6.13.0-syzkaller-06167-g0afd22092df4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __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:4828 [inline] check_wait_context kernel/locking/lockdep.c:4900 [inline] __lock_acquire+0x878/0x3c40 kernel/locking/lockdep.c:5178 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 add_stack_record_to_list mm/page_owner.c:182 [inline] inc_stack_record_count mm/page_owner.c:214 [inline] __set_page_owner+0x3ea/0x560 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3476 __alloc_pages_noprof+0x221/0x2470 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:2522 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:1738 [inline] __hrtimer_run_queues+0x5fb/0xae0 kernel/time/hrtimer.c:1802 hrtimer_interrupt+0x392/0x8e0 kernel/time/hrtimer.c:1864 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 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:console_flush_all+0x9a4/0xc60 kernel/printk/printk.c:3211 Code: 00 e8 00 c7 27 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 0e 1c 20 00 48 85 db 0f 85 55 01 00 00 e8 d0 20 20 00 fb 4c 89 e0 <48> c1 e8 03 42 80 3c 38 00 0f 84 11 ff ff ff 4c 89 e7 e8 65 29 83 RSP: 0018:ffffc90004b77580 EFLAGS: 00000283 RAX: ffffffff8eeac6b8 RBX: 0000000000000000 RCX: ffffc9000f051000 RDX: 0000000000080000 RSI: ffffffff8199a6e0 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000003 R12: ffffffff8eeac6b8 R13: ffffffff8eeac660 R14: ffffc90004b77610 R15: dffffc0000000000 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline] console_unlock+0xd9/0x210 kernel/printk/printk.c:3309 vprintk_emit+0x424/0x6f0 kernel/printk/printk.c:2432 _printk+0xc8/0x100 kernel/printk/printk.c:2457 selinux_netlink_send+0x6d0/0x830 security/selinux/hooks.c:5994 security_netlink_send+0x1e3/0x210 security/security.c:4294 netlink_sendmsg+0x83f/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:713 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0xaaf/0xc90 net/socket.c:2568 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2622 __sys_sendmsg+0x16e/0x220 net/socket.c:2654 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:0x7fe5de78cd29 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:00007fe5dc5f6038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fe5de9a6080 RCX: 00007fe5de78cd29 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00007fe5de80e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007fe5de9a6080 R15: 00007ffc136ab3f8 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e8 00 c7 27 00 call 0x27c705 5: 9c pushf 6: 5b pop %rbx 7: 81 e3 00 02 00 00 and $0x200,%ebx d: 31 ff xor %edi,%edi f: 48 89 de mov %rbx,%rsi 12: e8 0e 1c 20 00 call 0x201c25 17: 48 85 db test %rbx,%rbx 1a: 0f 85 55 01 00 00 jne 0x175 20: e8 d0 20 20 00 call 0x2020f5 25: fb sti 26: 4c 89 e0 mov %r12,%rax * 29: 48 c1 e8 03 shr $0x3,%rax <-- trapping instruction 2d: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) 32: 0f 84 11 ff ff ff je 0xffffff49 38: 4c 89 e7 mov %r12,%rdi 3b: e8 .byte 0xe8 3c: 65 gs 3d: 29 .byte 0x29 3e: 83 .byte 0x83