Insufficient stack space to handle exception! ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc5-syzkaller-gcc2c169e34b4 #0 Not tainted ------------------------------------------------------ modprobe/4329 is trying to acquire lock: ffffffff87ad0b20 (console_owner){-.-.}-{0:0}, at: console_lock_spinning_enable kernel/printk/printk.c:1866 [inline] ffffffff87ad0b20 (console_owner){-.-.}-{0:0}, at: console_emit_next_record kernel/printk/printk.c:2922 [inline] ffffffff87ad0b20 (console_owner){-.-.}-{0:0}, at: console_flush_all+0x52e/0xcf4 kernel/printk/printk.c:2994 but task is already holding lock: ff6000007ab51598 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1691 [inline] ff6000007ab51598 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x244/0x9ce kernel/time/hrtimer.c:1751 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (hrtimer_bases.lock){-.-.}-{2:2}: lock_acquire.part.0+0x2c6/0x820 kernel/locking/lockdep.c:5754 lock_acquire+0x74/0x98 kernel/locking/lockdep.c:5727 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3e/0x62 kernel/locking/spinlock.c:162 lock_hrtimer_base kernel/time/hrtimer.c:175 [inline] hrtimer_start_range_ns+0xda/0xa04 kernel/time/hrtimer.c:1298 rpm_suspend+0x6b6/0x10ca drivers/base/power/runtime.c:606 rpm_idle+0x5c6/0x72c drivers/base/power/runtime.c:536 __pm_runtime_idle+0xb0/0x18c drivers/base/power/runtime.c:1104 pm_runtime_put include/linux/pm_runtime.h:448 [inline] __device_attach+0x368/0x462 drivers/base/dd.c:1046 device_initial_probe+0x1c/0x26 drivers/base/dd.c:1077 bus_probe_device+0x15c/0x192 drivers/base/bus.c:532 device_add+0x10d8/0x181a drivers/base/core.c:3679 serdev_controller_add+0x52/0x44a drivers/tty/serdev/core.c:782 serdev_tty_port_register+0x152/0x27e drivers/tty/serdev/serdev-ttyport.c:300 tty_port_register_device_attr_serdev+0xca/0x140 drivers/tty/tty_port.c:191 serial_core_add_one_port drivers/tty/serial/serial_core.c:3217 [inline] serial_core_register_port+0xe64/0x1dfa drivers/tty/serial/serial_core.c:3429 serial_ctrl_register_port+0x20/0x2c drivers/tty/serial/serial_ctrl.c:41 uart_add_one_port+0x20/0x2c drivers/tty/serial/serial_port.c:143 serial8250_register_ports drivers/tty/serial/8250/8250_core.c:591 [inline] serial8250_init+0x3e2/0x496 drivers/tty/serial/8250/8250_core.c:1256 do_one_initcall+0x19a/0x98a init/main.c:1267 do_initcall_level init/main.c:1329 [inline] do_initcalls init/main.c:1345 [inline] do_basic_setup init/main.c:1364 [inline] kernel_init_freeable+0x6ec/0x792 init/main.c:1578 kernel_init+0x28/0x224 init/main.c:1467 ret_from_fork+0xe/0x1c arch/riscv/kernel/entry.S:232 -> #2 (&dev->power.lock){-...}-{2:2}: lock_acquire.part.0+0x2c6/0x820 kernel/locking/lockdep.c:5754 lock_acquire+0x74/0x98 kernel/locking/lockdep.c:5727 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3e/0x62 kernel/locking/spinlock.c:162 __pm_runtime_resume+0xa4/0x16a drivers/base/power/runtime.c:1171 pm_runtime_get include/linux/pm_runtime.h:396 [inline] __uart_start+0x174/0x3ee drivers/tty/serial/serial_core.c:148 uart_write+0x10a/0x2ea drivers/tty/serial/serial_core.c:633 process_output_block drivers/tty/n_tty.c:574 [inline] n_tty_write+0x37a/0x1010 drivers/tty/n_tty.c:2389 iterate_tty_write drivers/tty/tty_io.c:1021 [inline] file_tty_write.constprop.0+0x37c/0x7be drivers/tty/tty_io.c:1096 tty_write drivers/tty/tty_io.c:1117 [inline] redirected_tty_write drivers/tty/tty_io.c:1140 [inline] redirected_tty_write+0xf0/0x154 drivers/tty/tty_io.c:1120 new_sync_write fs/read_write.c:497 [inline] vfs_write+0x4c0/0x9a4 fs/read_write.c:590 ksys_write+0x12a/0x270 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __riscv_sys_write+0x6e/0x94 fs/read_write.c:652 syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:90 do_trap_ecall_u+0x14c/0x214 arch/riscv/kernel/traps.c:330 ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:112 -> #1 (&port_lock_key){-.-.}-{2:2}: lock_acquire.part.0+0x2c6/0x820 kernel/locking/lockdep.c:5754 lock_acquire+0x74/0x98 kernel/locking/lockdep.c:5727 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3e/0x62 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:618 [inline] serial8250_console_write+0x56a/0xe48 drivers/tty/serial/8250/8250_port.c:3352 univ8250_console_write+0x70/0x9c drivers/tty/serial/8250/8250_core.c:602 console_emit_next_record kernel/printk/printk.c:2928 [inline] console_flush_all+0x572/0xcf4 kernel/printk/printk.c:2994 console_unlock+0xde/0x296 kernel/printk/printk.c:3063 vprintk_emit kernel/printk/printk.c:2345 [inline] vprintk_emit+0x120/0x5fa kernel/printk/printk.c:2300 vprintk_default+0x26/0x32 kernel/printk/printk.c:2360 vprintk+0x226/0x296 kernel/printk/printk_safe.c:45 _printk+0x98/0xc0 kernel/printk/printk.c:2370 register_console+0x8b2/0xedc kernel/printk/printk.c:3596 uart_configure_port drivers/tty/serial/serial_core.c:2664 [inline] serial_core_add_one_port drivers/tty/serial/serial_core.c:3192 [inline] serial_core_register_port+0x1dd2/0x1dfa drivers/tty/serial/serial_core.c:3429 serial_ctrl_register_port+0x20/0x2c drivers/tty/serial/serial_ctrl.c:41 uart_add_one_port+0x20/0x2c drivers/tty/serial/serial_port.c:143 serial8250_register_8250_port+0x1160/0x1dae drivers/tty/serial/8250/8250_core.c:1140 of_platform_serial_probe+0x694/0xa86 drivers/tty/serial/8250/8250_of.c:236 platform_probe+0xfa/0x1e8 drivers/base/platform.c:1404 call_driver_probe drivers/base/dd.c:578 [inline] really_probe+0x232/0x9be drivers/base/dd.c:656 __driver_probe_device+0x1d4/0x3f2 drivers/base/dd.c:798 driver_probe_device+0x60/0x1ce drivers/base/dd.c:828 __driver_attach+0x250/0x4ee drivers/base/dd.c:1214 bus_for_each_dev+0x124/0x1ba drivers/base/bus.c:368 driver_attach+0x3e/0x52 drivers/base/dd.c:1231 bus_add_driver+0x29e/0x5e6 drivers/base/bus.c:673 driver_register+0x18e/0x3ee drivers/base/driver.c:246 __platform_driver_register+0x5e/0x7e drivers/base/platform.c:867 of_platform_serial_driver_init+0x22/0x2a drivers/tty/serial/8250/8250_of.c:358 do_one_initcall+0x19a/0x98a init/main.c:1267 do_initcall_level init/main.c:1329 [inline] do_initcalls init/main.c:1345 [inline] do_basic_setup init/main.c:1364 [inline] kernel_init_freeable+0x6ec/0x792 init/main.c:1578 kernel_init+0x28/0x224 init/main.c:1467 ret_from_fork+0xe/0x1c arch/riscv/kernel/entry.S:232 -> #0 (console_owner){-.-.}-{0:0}: check_noncircular+0x2ba/0x354 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2d46/0x80fc kernel/locking/lockdep.c:5137 lock_acquire.part.0+0x2c6/0x820 kernel/locking/lockdep.c:5754 lock_acquire+0x74/0x98 kernel/locking/lockdep.c:5727 console_lock_spinning_enable kernel/printk/printk.c:1870 [inline] console_emit_next_record kernel/printk/printk.c:2922 [inline] console_flush_all+0x554/0xcf4 kernel/printk/printk.c:2994 console_unlock+0xde/0x296 kernel/printk/printk.c:3063 vprintk_emit kernel/printk/printk.c:2345 [inline] vprintk_emit+0x120/0x5fa kernel/printk/printk.c:2300 vprintk_default+0x26/0x32 kernel/printk/printk.c:2360 vprintk+0x226/0x296 kernel/printk/printk_safe.c:45 _printk+0x98/0xc0 kernel/printk/printk.c:2370 handle_bad_stack+0x9a/0x10c arch/riscv/kernel/traps.c:420 __cpuset_zone_allowed include/linux/cpuset.h:89 [inline] get_page_from_freelist+0xac8/0x27e8 mm/page_alloc.c:3302 other info that might help us debug this: Chain exists of: console_owner --> &dev->power.lock --> hrtimer_bases.lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hrtimer_bases.lock); lock(&dev->power.lock); lock(hrtimer_bases.lock); lock(console_owner); *** DEADLOCK *** 15 locks held by modprobe/4329: #0: ff600000161e5688 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline] #0: ff600000161e5688 (&mm->mmap_lock){++++}-{3:3}, at: setup_arg_pages+0x28e/0xa64 fs/exec.c:814 #1: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: mt_write_locked lib/maple_tree.c:775 [inline] #1: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: mt_slot_locked lib/maple_tree.c:794 [inline] #1: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: mt_validate+0x0/0x3fd0 lib/maple_tree.c:3998 #2: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: INIT_LIST_HEAD include/linux/list.h:38 [inline] #2: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: list_splice_init include/linux/list.h:573 [inline] #2: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb_list_internal+0x35a/0xc28 net/core/dev.c:5843 #3: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: __skb_pull include/linux/skbuff.h:2723 [inline] #3: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0x216/0x57c net/ipv4/ip_input.c:230 #4: ff60000012f21a58 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x2c6a/0x3e64 net/ipv4/tcp_ipv4.c:2341 #5: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: read_pnet include/net/net_namespace.h:383 [inline] #5: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: sock_net include/net/sock.h:648 [inline] #5: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x52/0x1b1e net/ipv4/ip_output.c:460 #6: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:98 [inline] #6: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x458/0x2d1c net/ipv4/ip_output.c:221 #7: ffffffff87bc3f60 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x256/0x47f8 net/core/dev.c:4312 #8: ff60000017fab258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: spin_trylock include/linux/spinlock.h:361 [inline] #8: ff60000017fab258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: qdisc_run_begin include/net/sch_generic.h:197 [inline] #8: ff60000017fab258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: qdisc_run_begin include/net/sch_generic.h:194 [inline] #8: ff60000017fab258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3794 [inline] #8: ff60000017fab258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x1388/0x47f8 net/core/dev.c:4359 #9: ff6000000b93bcd8 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #9: ff6000000b93bcd8 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4347 [inline] #9: ff6000000b93bcd8 (_xmit_ETHER#2){+.-.}-{2:2}, at: sch_direct_xmit+0x302/0x51c net/sched/sch_generic.c:341 #10: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: generic_test_bit include/asm-generic/bitops/generic-non-atomic.h:128 [inline] #10: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: tif_need_resched include/linux/thread_info.h:192 [inline] #10: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: __preempt_count_dec_and_test include/asm-generic/preempt.h:69 [inline] #10: ffffffff87bc3f00 (rcu_read_lock){....}-{1:2}, at: dev_queue_xmit_nit+0x0/0xae0 include/trace/events/qdisc.h:49 #11: ff6000007ab51598 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1691 [inline] #11: ff6000007ab51598 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x244/0x9ce kernel/time/hrtimer.c:1751 #12: ffffffff88000640 (fill_pool_map-wait-type-override){+.+.}-{3:3}, at: debug_object_activate+0xf4/0x378 lib/debugobjects.c:743 #13: ffffffff87ad0720 (console_lock){+.+.}-{0:0}, at: vprintk_default+0x26/0x32 kernel/printk/printk.c:2360 #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: arch_atomic_read arch/riscv/include/asm/atomic.h:29 [inline] #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: raw_atomic_read include/linux/atomic/atomic-arch-fallback.h:457 [inline] #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: atomic_read include/linux/atomic/atomic-instrumented.h:33 [inline] #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: panic_in_progress kernel/printk/printk.c:347 [inline] #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: console_lock_spinning_enable kernel/printk/printk.c:1861 [inline] #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: console_emit_next_record kernel/printk/printk.c:2922 [inline] #14: ffffffff87ad0870 (console_srcu){....}-{0:0}, at: console_flush_all+0x112/0xcf4 kernel/printk/printk.c:2994 stack backtrace: CPU: 0 PID: 4329 Comm: modprobe Not tainted 6.10.0-rc5-syzkaller-gcc2c169e34b4 #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:129 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:135 [] __dump_stack lib/dump_stack.c:88 [inline] [] dump_stack_lvl+0x122/0x196 lib/dump_stack.c:114 [] dump_stack+0x1c/0x24 lib/dump_stack.c:123 [] print_circular_bug+0x6ba/0x740 kernel/locking/lockdep.c:2060 [] check_noncircular+0x2ba/0x354 kernel/locking/lockdep.c:2187 [] check_prev_add kernel/locking/lockdep.c:3134 [inline] [] check_prevs_add kernel/locking/lockdep.c:3253 [inline] [] validate_chain kernel/locking/lockdep.c:3869 [inline] [] __lock_acquire+0x2d46/0x80fc kernel/locking/lockdep.c:5137 [] lock_acquire.part.0+0x2c6/0x820 kernel/locking/lockdep.c:5754 [] lock_acquire+0x74/0x98 kernel/locking/lockdep.c:5727 [] console_lock_spinning_enable kernel/printk/printk.c:1870 [inline] [] console_emit_next_record kernel/printk/printk.c:2922 [inline] [] console_flush_all+0x554/0xcf4 kernel/printk/printk.c:2994 [] console_unlock+0xde/0x296 kernel/printk/printk.c:3063 [] vprintk_emit kernel/printk/printk.c:2345 [inline] [] vprintk_emit+0x120/0x5fa kernel/printk/printk.c:2300 [] vprintk_default+0x26/0x32 kernel/printk/printk.c:2360 [] vprintk+0x226/0x296 kernel/printk/printk_safe.c:45 [] _printk+0x98/0xc0 kernel/printk/printk.c:2370 [] handle_bad_stack+0x9a/0x10c arch/riscv/kernel/traps.c:420 [] __cpuset_zone_allowed include/linux/cpuset.h:89 [inline] [] get_page_from_freelist+0xac8/0x27e8 mm/page_alloc.c:3302 Task stack: [0xff20000009d68000..0xff20000009d6c000] Overflow stack: [0xff6000007ab4c070..0xff6000007ab4d070] CPU: 0 PID: 4329 Comm: modprobe Not tainted 6.10.0-rc5-syzkaller-gcc2c169e34b4 #0 Hardware name: riscv-virtio,qemu (DT) epc : cpuset_node_allowed+0x8/0x59e kernel/cgroup/cpuset.c:4872 ra : __cpuset_zone_allowed include/linux/cpuset.h:89 [inline] ra : get_page_from_freelist+0xac8/0x27e8 mm/page_alloc.c:3302 epc : ffffffff803d4ec8 ra : ffffffff808742ba sp : ff1fffffffffffd0 gp : ffffffff8925a640 tp : 0000000000000000 t0 : 0000000000000000 t1 : ff200000000003b0 t2 : ff60000022550b20 s0 : ff20000000000230 s1 : 1fe4000000000078 a0 : 0000000000000000 a1 : 0000000000192020 a2 : 0000000000000041 a3 : 0000000000000002 a4 : 1fec00000fdbdc68 a5 : 0000000000000000 a6 : ff6000007edee340 a7 : ffffffffdfffffff s2 : 0000000000192020 s3 : ff200000000003b0 s4 : dfffffff00000000 s5 : 0000000000000002 s6 : ff6000007edee340 s7 : 0000000000000002 s8 : ff6000007edecfc0 s9 : ff6000007edecfc0 s10: ff20000000000480 s11: 1fe4000000000068 t3 : ff6000007eded5d0 t4 : ffe37fff000c7566 t5 : ffe37fff000c7567 t6 : 1fec0000044aa1ae status: 0000000200000100 badaddr: ff1ffffffffffff8 cause: 000000000000000f