------------[ cut here ]------------ ====================================================== WARNING: possible circular locking dependency detected 6.12.0-syzkaller-07749-g28eb75e178d3 #0 Not tainted ------------------------------------------------------ kworker/0:2/950 is trying to acquire lock: ffff800086de9720 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x7c/0xbc kernel/printk/printk.c:1920 but task is already holding lock: ffff000069f88e18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2c/0x44 kernel/sched/core.c:598 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 _raw_spin_lock_nested+0x50/0x6c kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested kernel/sched/core.c:598 [inline] raw_spin_rq_lock kernel/sched/sched.h:1514 [inline] task_rq_lock+0xd0/0x2fc kernel/sched/core.c:700 cgroup_move_task+0x88/0x194 kernel/sched/psi.c:1161 css_set_move_task+0x1b8/0x3f8 kernel/cgroup/cgroup.c:898 cgroup_post_fork+0x12c/0x5b0 kernel/cgroup/cgroup.c:6691 copy_process+0x33d8/0x50e0 kernel/fork.c:2601 kernel_clone+0x140/0x7ec kernel/fork.c:2787 user_mode_thread+0xb4/0xf0 kernel/fork.c:2865 rest_init+0x2c/0x210 init/main.c:712 start_kernel+0x35c/0x3d4 init/main.c:1102 __primary_switched+0x8c/0x94 arch/arm64/kernel/head.S:246 -> #4 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] try_to_wake_up+0xb4/0x18d8 kernel/sched/core.c:4205 wake_up_process+0x18/0x24 kernel/sched/core.c:4454 create_worker+0x2b8/0x694 kernel/workqueue.c:2825 workqueue_init+0x510/0xaa0 kernel/workqueue.c:7916 kernel_init_freeable+0x27c/0x6c0 init/main.c:1561 kernel_init+0x24/0x1e0 init/main.c:1466 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 -> #3 (&pool->lock){-.-.}-{2:2}: lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154 __queue_work+0x1a4/0x1128 kernel/workqueue.c:2299 queue_work_on+0xc0/0x100 kernel/workqueue.c:2390 queue_work include/linux/workqueue.h:662 [inline] rpm_suspend+0x96c/0xc64 drivers/base/power/runtime.c:662 rpm_idle+0x43c/0x578 drivers/base/power/runtime.c:536 __pm_runtime_idle+0x70/0xe0 drivers/base/power/runtime.c:1104 pm_runtime_put include/linux/pm_runtime.h:448 [inline] __device_attach+0x264/0x35c drivers/base/dd.c:1048 device_initial_probe+0x14/0x20 drivers/base/dd.c:1079 bus_probe_device+0x124/0x15c drivers/base/bus.c:534 device_add+0xc2c/0x12b8 drivers/base/core.c:3672 serial_base_port_add+0x264/0x3c0 drivers/tty/serial/serial_base_bus.c:179 serial_core_port_device_add drivers/tty/serial/serial_core.c:3370 [inline] serial_core_register_port+0x118/0x1cb4 drivers/tty/serial/serial_core.c:3411 serial_ctrl_register_port+0x10/0x1c drivers/tty/serial/serial_ctrl.c:41 uart_add_one_port+0x10/0x1c drivers/tty/serial/serial_port.c:143 pl011_register_port+0x10c/0x2ac drivers/tty/serial/amba-pl011.c:2744 pl011_probe+0x490/0x5f4 drivers/tty/serial/amba-pl011.c:2809 amba_probe+0x1c0/0x358 drivers/amba/bus.c:308 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x180/0x7dc drivers/base/dd.c:658 __driver_probe_device+0x15c/0x364 drivers/base/dd.c:800 driver_probe_device+0x5c/0x16c drivers/base/dd.c:830 __device_attach_driver+0x16c/0x270 drivers/base/dd.c:958 bus_for_each_drv+0x104/0x18c drivers/base/bus.c:459 __device_attach+0x168/0x35c drivers/base/dd.c:1030 device_initial_probe+0x14/0x20 drivers/base/dd.c:1079 bus_probe_device+0x124/0x15c drivers/base/bus.c:534 device_add+0xc2c/0x12b8 drivers/base/core.c:3672 amba_device_add+0x70/0x110 drivers/amba/bus.c:575 of_amba_device_create drivers/of/platform.c:257 [inline] of_platform_bus_create+0x554/0x768 drivers/of/platform.c:376 of_platform_populate+0x58/0x160 drivers/of/platform.c:470 of_platform_default_populate drivers/of/platform.c:487 [inline] of_platform_default_populate_init+0xf4/0x118 drivers/of/platform.c:595 do_one_initcall+0x130/0x770 init/main.c:1266 do_initcall_level init/main.c:1328 [inline] do_initcalls init/main.c:1344 [inline] do_basic_setup init/main.c:1363 [inline] kernel_init_freeable+0x484/0x6c0 init/main.c:1577 kernel_init+0x24/0x1e0 init/main.c:1466 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 -> #2 (&dev->power.lock){-...}-{3:3}: lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 __pm_runtime_resume+0x90/0x12c drivers/base/power/runtime.c:1171 pm_runtime_get include/linux/pm_runtime.h:396 [inline] __uart_start+0x110/0x35c drivers/tty/serial/serial_core.c:148 uart_write+0x160/0x85c drivers/tty/serial/serial_core.c:635 process_output_block drivers/tty/n_tty.c:574 [inline] n_tty_write+0x308/0xb90 drivers/tty/n_tty.c:2389 iterate_tty_write drivers/tty/tty_io.c:1015 [inline] file_tty_write.constprop.0+0x2c4/0x624 drivers/tty/tty_io.c:1090 tty_write drivers/tty/tty_io.c:1111 [inline] redirected_tty_write drivers/tty/tty_io.c:1134 [inline] redirected_tty_write+0xd8/0x130 drivers/tty/tty_io.c:1114 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x4b0/0xad0 fs/read_write.c:679 ksys_write+0xec/0x1d8 fs/read_write.c:731 __do_sys_write fs/read_write.c:742 [inline] __se_sys_write fs/read_write.c:739 [inline] __arm64_sys_write+0x6c/0x9c fs/read_write.c:739 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #1 (&port_lock_key){....}-{3:3}: lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:715 [inline] pl011_console_write+0x10c/0x9dc drivers/tty/serial/amba-pl011.c:2316 console_emit_next_record kernel/printk/printk.c:3122 [inline] console_flush_all+0x488/0x8dc kernel/printk/printk.c:3210 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline] console_unlock+0xd0/0x1c4 kernel/printk/printk.c:3309 vprintk_emit+0x37c/0x498 kernel/printk/printk.c:2432 vprintk_default+0x38/0x44 kernel/printk/printk.c:2447 vprintk+0x40/0x90 kernel/printk/printk_safe.c:86 _printk+0xa8/0xe0 kernel/printk/printk.c:2457 register_console+0x7fc/0xca0 kernel/printk/printk.c:4099 uart_configure_port drivers/tty/serial/serial_core.c:2655 [inline] serial_core_add_one_port drivers/tty/serial/serial_core.c:3182 [inline] serial_core_register_port+0x1324/0x1cb4 drivers/tty/serial/serial_core.c:3419 serial_ctrl_register_port+0x10/0x1c drivers/tty/serial/serial_ctrl.c:41 uart_add_one_port+0x10/0x1c drivers/tty/serial/serial_port.c:143 pl011_register_port+0x10c/0x2ac drivers/tty/serial/amba-pl011.c:2744 pl011_probe+0x490/0x5f4 drivers/tty/serial/amba-pl011.c:2809 amba_probe+0x1c0/0x358 drivers/amba/bus.c:308 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x180/0x7dc drivers/base/dd.c:658 __driver_probe_device+0x15c/0x364 drivers/base/dd.c:800 driver_probe_device+0x5c/0x16c drivers/base/dd.c:830 __device_attach_driver+0x16c/0x270 drivers/base/dd.c:958 bus_for_each_drv+0x104/0x18c drivers/base/bus.c:459 __device_attach+0x168/0x35c drivers/base/dd.c:1030 device_initial_probe+0x14/0x20 drivers/base/dd.c:1079 bus_probe_device+0x124/0x15c drivers/base/bus.c:534 device_add+0xc2c/0x12b8 drivers/base/core.c:3672 amba_device_add+0x70/0x110 drivers/amba/bus.c:575 of_amba_device_create drivers/of/platform.c:257 [inline] of_platform_bus_create+0x554/0x768 drivers/of/platform.c:376 of_platform_populate+0x58/0x160 drivers/of/platform.c:470 of_platform_default_populate drivers/of/platform.c:487 [inline] of_platform_default_populate_init+0xf4/0x118 drivers/of/platform.c:595 do_one_initcall+0x130/0x770 init/main.c:1266 do_initcall_level init/main.c:1328 [inline] do_initcalls init/main.c:1344 [inline] do_basic_setup init/main.c:1363 [inline] kernel_init_freeable+0x484/0x6c0 init/main.c:1577 kernel_init+0x24/0x1e0 init/main.c:1466 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 -> #0 (console_owner){....}-{0:0}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x2b88/0x660c kernel/locking/lockdep.c:5226 lock_acquire.part.0+0x224/0x4f4 kernel/locking/lockdep.c:5849 lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 console_lock_spinning_enable+0xa0/0xbc kernel/printk/printk.c:1924 console_emit_next_record kernel/printk/printk.c:3116 [inline] console_flush_all+0x43c/0x8dc kernel/printk/printk.c:3210 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline] console_unlock+0xd0/0x1c4 kernel/printk/printk.c:3309 vprintk_emit+0x37c/0x498 kernel/printk/printk.c:2432 vprintk_default+0x38/0x44 kernel/printk/printk.c:2447 vprintk+0x40/0x90 kernel/printk/printk_safe.c:86 _printk+0xa8/0xe0 kernel/printk/printk.c:2457 __report_bug lib/bug.c:195 [inline] report_bug+0x33c/0x47c lib/bug.c:219 bug_handler+0x3c/0x94 arch/arm64/kernel/traps.c:1010 call_break_hook arch/arm64/kernel/debug-monitors.c:315 [inline] brk_handler+0x10c/0x1f8 arch/arm64/kernel/debug-monitors.c:325 do_debug_exception+0xb8/0x310 arch/arm64/mm/fault.c:1002 el1_dbg+0x80/0x9c arch/arm64/kernel/entry-common.c:490 el1h_64_sync_handler+0xe8/0x124 arch/arm64/kernel/entry-common.c:536 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:595 enqueue_dl_entity+0x1018/0x1d50 kernel/sched/deadline.c:2029 dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 enqueue_task_fair+0x364/0xed8 kernel/sched/fair.c:7038 enqueue_task+0x68/0x254 kernel/sched/core.c:2061 activate_task+0x64/0xdc kernel/sched/core.c:2108 attach_task+0xd4/0x150 kernel/sched/fair.c:9635 attach_tasks kernel/sched/fair.c:9670 [inline] sched_balance_rq+0xdb0/0x254c kernel/sched/fair.c:11747 sched_balance_newidle+0x54c/0xe70 kernel/sched/fair.c:12789 pick_next_task_fair+0x54/0xd48 kernel/sched/fair.c:8937 __pick_next_task kernel/sched/core.c:6023 [inline] pick_next_task kernel/sched/core.c:6542 [inline] __schedule+0x420/0x2db0 kernel/sched/core.c:6709 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0xd0/0x304 kernel/sched/core.c:6848 worker_thread+0x3e8/0xb74 kernel/workqueue.c:3406 kthread+0x27c/0x300 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 other info that might help us debug this: Chain exists of: console_owner --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(console_owner); *** DEADLOCK *** 4 locks held by kworker/0:2/950: #0: ffff800086ed8960 (rcu_read_lock){....}-{1:3}, at: rcu_read_unlock include/linux/rcupdate.h:878 [inline] #0: ffff800086ed8960 (rcu_read_lock){....}-{1:3}, at: sched_balance_newidle+0x354/0xe70 kernel/sched/fair.c:12771 #1: ffff000069f88e18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2c/0x44 kernel/sched/core.c:598 #2: ffff800086de91e0 (console_lock){+.+.}-{0:0}, at: vprintk_default+0x38/0x44 kernel/printk/printk.c:2447 #3: ffff800086de9430 (console_srcu){....}-{0:0}, at: console_flush_all+0x120/0x8dc kernel/printk/printk.c:3180 stack backtrace: CPU: 0 UID: 0 PID: 950 Comm: kworker/0:2 Not tainted 6.12.0-syzkaller-07749-g28eb75e178d3 #0 Hardware name: linux,dummy-virt (DT) Workqueue: 0x0 (events) Call trace: show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x428/0x704 kernel/locking/lockdep.c:2074 check_noncircular+0x2dc/0x364 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x2b88/0x660c kernel/locking/lockdep.c:5226 lock_acquire.part.0+0x224/0x4f4 kernel/locking/lockdep.c:5849 lock_acquire+0x90/0xb4 kernel/locking/lockdep.c:5822 console_lock_spinning_enable+0xa0/0xbc kernel/printk/printk.c:1924 console_emit_next_record kernel/printk/printk.c:3116 [inline] console_flush_all+0x43c/0x8dc kernel/printk/printk.c:3210 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline] console_unlock+0xd0/0x1c4 kernel/printk/printk.c:3309 vprintk_emit+0x37c/0x498 kernel/printk/printk.c:2432 vprintk_default+0x38/0x44 kernel/printk/printk.c:2447 vprintk+0x40/0x90 kernel/printk/printk_safe.c:86 _printk+0xa8/0xe0 kernel/printk/printk.c:2457 __report_bug lib/bug.c:195 [inline] report_bug+0x33c/0x47c lib/bug.c:219 bug_handler+0x3c/0x94 arch/arm64/kernel/traps.c:1010 call_break_hook arch/arm64/kernel/debug-monitors.c:315 [inline] brk_handler+0x10c/0x1f8 arch/arm64/kernel/debug-monitors.c:325 do_debug_exception+0xb8/0x310 arch/arm64/mm/fault.c:1002 el1_dbg+0x80/0x9c arch/arm64/kernel/entry-common.c:490 el1h_64_sync_handler+0xe8/0x124 arch/arm64/kernel/entry-common.c:536 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:595 enqueue_dl_entity+0x1018/0x1d50 kernel/sched/deadline.c:2029 (P) dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 (L) dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 enqueue_task_fair+0x364/0xed8 kernel/sched/fair.c:7038 enqueue_task+0x68/0x254 kernel/sched/core.c:2061 activate_task+0x64/0xdc kernel/sched/core.c:2108 attach_task+0xd4/0x150 kernel/sched/fair.c:9635 attach_tasks kernel/sched/fair.c:9670 [inline] sched_balance_rq+0xdb0/0x254c kernel/sched/fair.c:11747 sched_balance_newidle+0x54c/0xe70 kernel/sched/fair.c:12789 pick_next_task_fair+0x54/0xd48 kernel/sched/fair.c:8937 __pick_next_task kernel/sched/core.c:6023 [inline] pick_next_task kernel/sched/core.c:6542 [inline] __schedule+0x420/0x2db0 kernel/sched/core.c:6709 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0xd0/0x304 kernel/sched/core.c:6848 worker_thread+0x3e8/0xb74 kernel/workqueue.c:3406 kthread+0x27c/0x300 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 WARNING: CPU: 0 PID: 950 at kernel/sched/deadline.c:1995 enqueue_dl_entity+0x1018/0x1d50 kernel/sched/deadline.c:2029 Modules linked in: CPU: 0 UID: 0 PID: 950 Comm: kworker/0:2 Not tainted 6.12.0-syzkaller-07749-g28eb75e178d3 #0 Hardware name: linux,dummy-virt (DT) Workqueue: 0x0 (events) pstate: a00000c5 (NzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : enqueue_dl_entity+0x1018/0x1d50 kernel/sched/deadline.c:1995 lr : dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 sp : ffff80008e6174b0 x29: ffff80008e6174b0 x28: dfff800000000000 x27: 0000000000000000 x26: 0000000000000007 x25: 0000000000000001 x24: ffff000069f88e00 x23: ffff000069f897e8 x22: 1fffe0000d3f1318 x21: 1fffe0000d3f1307 x20: ffff000069f8983c x19: ffff000069f897e8 x18: 00000000ab2e5a45 x17: 0000000000000000 x16: 0000000000000000 x15: 1fffe0000296714c x14: 1ffff000110ce4ff x13: ffff000014b38a80 x12: ffff600002967001 x11: 1fffe00002967000 x10: ffff600002967000 x9 : dfff800000000000 x8 : 1fffe0000d3f11db x7 : dfff800000000000 x6 : 0000000000000000 x5 : 1fffe0000d3f133d x4 : 1fffe0000258a7aa x3 : 1fffe0000d3f1208 x2 : dfff800000000000 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: enqueue_dl_entity+0x1018/0x1d50 kernel/sched/deadline.c:2029 (P) dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 (L) dl_server_start+0xb4/0x648 kernel/sched/deadline.c:1650 enqueue_task_fair+0x364/0xed8 kernel/sched/fair.c:7038 enqueue_task+0x68/0x254 kernel/sched/core.c:2061 activate_task+0x64/0xdc kernel/sched/core.c:2108 attach_task+0xd4/0x150 kernel/sched/fair.c:9635 attach_tasks kernel/sched/fair.c:9670 [inline] sched_balance_rq+0xdb0/0x254c kernel/sched/fair.c:11747 sched_balance_newidle+0x54c/0xe70 kernel/sched/fair.c:12789 pick_next_task_fair+0x54/0xd48 kernel/sched/fair.c:8937 __pick_next_task kernel/sched/core.c:6023 [inline] pick_next_task kernel/sched/core.c:6542 [inline] __schedule+0x420/0x2db0 kernel/sched/core.c:6709 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0xd0/0x304 kernel/sched/core.c:6848 worker_thread+0x3e8/0xb74 kernel/workqueue.c:3406 kthread+0x27c/0x300 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 irq event stamp: 26106 hardirqs last enabled at (26105): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (26105): [] _raw_spin_unlock_irq+0x30/0x8c kernel/locking/spinlock.c:202 hardirqs last disabled at (26106): [] __schedule+0xbc0/0x2db0 kernel/sched/core.c:6660 softirqs last enabled at (24928): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (24928): [] handle_softirqs+0x87c/0xd44 kernel/softirq.c:582 softirqs last disabled at (24911): [] __do_softirq+0x14/0x20 kernel/softirq.c:588 ---[ end trace 0000000000000000 ]---