ODEBUG: Out of memory. ODEBUG disabled ====================================================== WARNING: possible circular locking dependency detected 5.15.169-syzkaller #0 Not tainted ------------------------------------------------------ syz.2.68/4393 is trying to acquire lock: ffffffff8c9147e0 (console_owner){-...}-{0:0}, at: console_lock_spinning_enable+0x2c/0x60 kernel/printk/printk.c:1802 but task is already holding lock: ffff88806262edb8 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xc5/0xc00 kernel/bpf/lpm_trie.c:323 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&trie->lock){....}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x690 kernel/bpf/lpm_trie.c:450 0xffffffffa002e73f bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 trace_tlb_flush+0xed/0x110 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x748/0xa30 context_switch kernel/sched/core.c:5013 [inline] __schedule+0x1167/0x45b0 kernel/sched/core.c:6373 schedule+0x11b/0x1f0 kernel/sched/core.c:6456 worker_thread+0xf56/0x1280 kernel/workqueue.c:2478 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #4 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 _raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:368 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 raw_spin_rq_lock kernel/sched/sched.h:1326 [inline] rq_lock kernel/sched/sched.h:1621 [inline] task_fork_fair+0x5d/0x350 kernel/sched/fair.c:11484 sched_cgroup_fork+0x2d3/0x330 kernel/sched/core.c:4463 copy_process+0x224a/0x3ef0 kernel/fork.c:2317 kernel_clone+0x210/0x960 kernel/fork.c:2601 kernel_thread+0x168/0x1e0 kernel/fork.c:2653 rest_init+0x21/0x330 init/main.c:706 start_kernel+0x48c/0x540 init/main.c:1140 secondary_startup_64_no_verify+0xb1/0xbb -> #3 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 try_to_wake_up+0xae/0x1300 kernel/sched/core.c:4027 __wake_up_common+0x2a0/0x4e0 kernel/sched/wait.c:108 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x112/0x1c0 kernel/sched/wait.c:157 tty_port_default_wakeup+0xa8/0x100 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x60d/0x800 drivers/tty/serial/8250/8250_port.c:1828 serial8250_handle_irq+0x505/0x600 drivers/tty/serial/8250/8250_port.c:1924 serial8250_default_handle_irq+0xc8/0x1e0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0xa1/0x1e0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x292/0xa70 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xff/0x2b0 kernel/irq/handle.c:213 handle_edge_irq+0x245/0xbf0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0xae/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 mod_delayed_work_on+0x1cf/0x250 kernel/workqueue.c:1758 kblockd_mod_delayed_work_on+0x25/0x30 block/blk-core.c:1636 blk_mq_run_hw_queue+0x1d5/0x3c0 block/blk-mq.c:1641 blk_mq_sched_insert_requests+0x2cd/0x570 block/blk-mq-sched.c:519 blk_mq_flush_plug_list+0x5de/0x6b0 block/blk-mq.c:1965 blk_flush_plug_list+0x44b/0x490 block/blk-core.c:1734 blk_schedule_flush_plug include/linux/blkdev.h:1235 [inline] io_schedule_prepare kernel/sched/core.c:8449 [inline] io_schedule_timeout+0x8a/0x120 kernel/sched/core.c:8468 do_wait_for_common+0x2d9/0x480 kernel/sched/completion.c:85 __wait_for_common kernel/sched/completion.c:106 [inline] wait_for_common_io kernel/sched/completion.c:123 [inline] wait_for_completion_io_timeout+0x46/0x60 kernel/sched/completion.c:191 submit_bio_wait+0x145/0x200 block/bio.c:1234 blkdev_issue_zeroout+0x305/0x470 block/blk-lib.c:420 ext4_init_inode_table+0x437/0x810 fs/ext4/ialloc.c:1614 ext4_run_li_request fs/ext4/super.c:3324 [inline] ext4_lazyinit_thread+0x77f/0x19c0 fs/ext4/super.c:3415 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #2 (&tty->write_wait){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xf5/0x1c0 kernel/sched/wait.c:157 tty_port_default_wakeup+0xa8/0x100 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x60d/0x800 drivers/tty/serial/8250/8250_port.c:1828 serial8250_handle_irq+0x505/0x600 drivers/tty/serial/8250/8250_port.c:1924 serial8250_default_handle_irq+0xc8/0x1e0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0xa1/0x1e0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x292/0xa70 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xff/0x2b0 kernel/irq/handle.c:213 handle_edge_irq+0x245/0xbf0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0xae/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline] acpi_safe_halt drivers/acpi/processor_idle.c:108 [inline] acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:562 acpi_idle_enter+0x352/0x4f0 drivers/acpi/processor_idle.c:697 cpuidle_enter_state+0x521/0xef0 drivers/cpuidle/cpuidle.c:237 cpuidle_enter+0x59/0x90 drivers/cpuidle/cpuidle.c:351 call_cpuidle kernel/sched/idle.c:158 [inline] cpuidle_idle_call kernel/sched/idle.c:239 [inline] do_idle+0x3e4/0x670 kernel/sched/idle.c:306 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_secondary+0x371/0x500 arch/x86/kernel/smpboot.c:281 secondary_startup_64_no_verify+0xb1/0xbb -> #1 (&port_lock_key){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 serial8250_console_write+0x19d/0x1180 drivers/tty/serial/8250/8250_port.c:3354 console_unlock+0xced/0x12b0 kernel/printk/printk.c:2744 vprintk_emit+0xbf/0x150 kernel/printk/printk.c:2274 _printk+0xd1/0x120 kernel/printk/printk.c:2299 register_console+0x65a/0x940 kernel/printk/printk.c:3107 univ8250_console_init+0x41/0x50 drivers/tty/serial/8250/8250_core.c:690 console_init+0x18c/0x660 kernel/printk/printk.c:3207 start_kernel+0x301/0x540 init/main.c:1076 secondary_startup_64_no_verify+0xb1/0xbb -> #0 (console_owner){-...}-{0:0}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 console_lock_spinning_enable+0x51/0x60 kernel/printk/printk.c:1805 console_unlock+0xa47/0x12b0 kernel/printk/printk.c:2741 vprintk_emit+0xbf/0x150 kernel/printk/printk.c:2274 _printk+0xd1/0x120 kernel/printk/printk.c:2299 debug_objects_oom+0xb4/0x370 lib/debugobjects.c:473 debug_object_activate+0x42d/0x4e0 lib/debugobjects.c:699 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] kvfree_call_rcu+0xb6/0x8a0 kernel/rcu/tree.c:3587 trie_update_elem+0x808/0xc00 kernel/bpf/lpm_trie.c:384 bpf_map_update_value+0x5d7/0x6c0 kernel/bpf/syscall.c:221 generic_map_update_batch+0x54d/0x8b0 kernel/bpf/syscall.c:1421 bpf_map_do_batch+0x4d0/0x620 __sys_bpf+0x55c/0x670 __do_sys_bpf kernel/bpf/syscall.c:4755 [inline] __se_sys_bpf kernel/bpf/syscall.c:4753 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4753 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: console_owner --> &rq->__lock --> &trie->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&trie->lock); lock(&rq->__lock); lock(&trie->lock); lock(console_owner); *** DEADLOCK *** 3 locks held by syz.2.68/4393: #0: ffffffff8c91fc60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #1: ffff88806262edb8 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xc5/0xc00 kernel/bpf/lpm_trie.c:323 #2: ffffffff8c7fc520 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0xa6/0x150 kernel/printk/printk.c:2273 stack backtrace: CPU: 0 PID: 4393 Comm: syz.2.68 Not tainted 5.15.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 console_lock_spinning_enable+0x51/0x60 kernel/printk/printk.c:1805 console_unlock+0xa47/0x12b0 kernel/printk/printk.c:2741 vprintk_emit+0xbf/0x150 kernel/printk/printk.c:2274 _printk+0xd1/0x120 kernel/printk/printk.c:2299 debug_objects_oom+0xb4/0x370 lib/debugobjects.c:473 debug_object_activate+0x42d/0x4e0 lib/debugobjects.c:699 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] kvfree_call_rcu+0xb6/0x8a0 kernel/rcu/tree.c:3587 trie_update_elem+0x808/0xc00 kernel/bpf/lpm_trie.c:384 bpf_map_update_value+0x5d7/0x6c0 kernel/bpf/syscall.c:221 generic_map_update_batch+0x54d/0x8b0 kernel/bpf/syscall.c:1421 bpf_map_do_batch+0x4d0/0x620 __sys_bpf+0x55c/0x670 __do_sys_bpf kernel/bpf/syscall.c:4755 [inline] __se_sys_bpf kernel/bpf/syscall.c:4753 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4753 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f07d6ee1719 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:00007f07d5359038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f07d7098f80 RCX: 00007f07d6ee1719 RDX: 0000000000000038 RSI: 0000000020000640 RDI: 000000000000001a RBP: 00007f07d6f542be R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f07d7098f80 R15: 00007ffcca0bbd98