------------[ cut here ]------------ ====================================================== WARNING: possible circular locking dependency detected 6.12.0-rc7-syzkaller-00216-gf66d6acccbc0 #0 Not tainted ------------------------------------------------------ kworker/1:2/1210 is trying to acquire lock: ffffffff8e0c5680 (console_owner){..-.}-{0:0}, at: console_lock_spinning_enable+0x9f/0xd0 kernel/printk/printk.c:1905 but task is already holding lock: ffff8880b873eed8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 raw_spin_rq_lock kernel/sched/sched.h:1506 [inline] task_rq_lock+0xcf/0x3b0 kernel/sched/core.c:700 cgroup_move_task+0x82/0x250 kernel/sched/psi.c:1161 css_set_move_task+0x288/0x5f0 kernel/cgroup/cgroup.c:898 cgroup_post_fork+0x1c6/0x910 kernel/cgroup/cgroup.c:6692 copy_process+0x51a5/0x8cb0 kernel/fork.c:2600 kernel_clone+0xfd/0x960 kernel/fork.c:2786 user_mode_thread+0xb4/0xf0 kernel/fork.c:2864 rest_init+0x23/0x2b0 init/main.c:712 start_kernel+0x3e4/0x4d0 init/main.c:1105 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x148 -> #3 (&p->pi_lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] try_to_wake_up+0xa1/0x14f0 kernel/sched/core.c:4165 __wake_up_common+0x134/0x1e0 kernel/sched/wait.c:89 __wake_up_common_lock kernel/sched/wait.c:106 [inline] __wake_up+0x31/0x60 kernel/sched/wait.c:127 tty_port_default_wakeup+0x2a/0x40 drivers/tty/tty_port.c:69 serial8250_tx_chars+0x68e/0x860 drivers/tty/serial/8250/8250_port.c:1821 serial8250_handle_irq+0x74d/0xc80 drivers/tty/serial/8250/8250_port.c:1929 serial8250_default_handle_irq+0x9a/0x210 drivers/tty/serial/8250/8250_port.c:1949 serial8250_interrupt+0x106/0x210 drivers/tty/serial/8250/8250_core.c:86 __handle_irq_event_percpu+0x22c/0x7c0 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x263/0xd10 kernel/irq/chip.c:831 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:247 [inline] call_irq_handler arch/x86/kernel/irq.c:259 [inline] __common_interrupt+0xe2/0x250 arch/x86/kernel/irq.c:285 common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:106 [inline] acpi_safe_halt+0x1a/0x20 drivers/acpi/processor_idle.c:111 acpi_idle_enter+0xc5/0x160 drivers/acpi/processor_idle.c:702 cpuidle_enter_state+0xad/0x4f0 drivers/cpuidle/cpuidle.c:264 cpuidle_enter+0x4e/0xa0 drivers/cpuidle/cpuidle.c:385 cpuidle_idle_call kernel/sched/idle.c:230 [inline] do_idle+0x313/0x3f0 kernel/sched/idle.c:326 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:424 start_secondary+0x222/0x2b0 arch/x86/kernel/smpboot.c:314 common_startup_64+0x13e/0x148 -> #2 (&tty->write_wait){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x1c/0x60 kernel/sched/wait.c:127 tty_port_default_wakeup+0x2a/0x40 drivers/tty/tty_port.c:69 serial8250_tx_chars+0x68e/0x860 drivers/tty/serial/8250/8250_port.c:1821 serial8250_handle_irq+0x74d/0xc80 drivers/tty/serial/8250/8250_port.c:1929 serial8250_default_handle_irq+0x9a/0x210 drivers/tty/serial/8250/8250_port.c:1949 serial8250_interrupt+0x106/0x210 drivers/tty/serial/8250/8250_core.c:86 __handle_irq_event_percpu+0x22c/0x7c0 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x263/0xd10 kernel/irq/chip.c:831 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:247 [inline] call_irq_handler arch/x86/kernel/irq.c:259 [inline] __common_interrupt+0xe2/0x250 arch/x86/kernel/irq.c:285 common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] _raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_port_unlock_irqrestore include/linux/serial_core.h:782 [inline] uart_write+0x2a4/0xb30 drivers/tty/serial/serial_core.c:636 process_output_block drivers/tty/n_tty.c:574 [inline] n_tty_write+0x41c/0x1140 drivers/tty/n_tty.c:2389 iterate_tty_write drivers/tty/tty_io.c:1015 [inline] file_tty_write.constprop.0+0x509/0x9a0 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+0xcc/0x140 drivers/tty/tty_io.c:1114 new_sync_write fs/read_write.c:590 [inline] vfs_write+0x5b1/0x1150 fs/read_write.c:683 ksys_write+0x12f/0x260 fs/read_write.c:736 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 -> #1 (&port_lock_key){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:711 [inline] serial8250_console_write+0xb56/0x17c0 drivers/tty/serial/8250/8250_port.c:3352 console_emit_next_record kernel/printk/printk.c:3092 [inline] console_flush_all+0x803/0xc60 kernel/printk/printk.c:3180 __console_flush_and_unlock kernel/printk/printk.c:3239 [inline] console_unlock+0xd9/0x210 kernel/printk/printk.c:3279 vprintk_emit+0x424/0x6f0 kernel/printk/printk.c:2407 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:68 _printk+0xc8/0x100 kernel/printk/printk.c:2432 register_console+0xbfd/0x1170 kernel/printk/printk.c:4069 univ8250_console_init+0x5f/0x90 drivers/tty/serial/8250/8250_core.c:513 console_init+0xcc/0x680 kernel/printk/printk.c:4262 start_kernel+0x29a/0x4d0 init/main.c:1040 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x148 -> #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+0x250b/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 console_lock_spinning_enable+0xb0/0xd0 kernel/printk/printk.c:1905 console_emit_next_record kernel/printk/printk.c:3086 [inline] console_flush_all+0x7ac/0xc60 kernel/printk/printk.c:3180 __console_flush_and_unlock kernel/printk/printk.c:3239 [inline] console_unlock+0xd9/0x210 kernel/printk/printk.c:3279 vprintk_emit+0x424/0x6f0 kernel/printk/printk.c:2407 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:68 _printk+0xc8/0x100 kernel/printk/printk.c:2432 __report_bug lib/bug.c:195 [inline] report_bug+0x4ac/0x580 lib/bug.c:219 handle_bug+0x54/0xa0 arch/x86/kernel/traps.c:285 exc_invalid_op+0x17/0x50 arch/x86/kernel/traps.c:309 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 enqueue_dl_entity+0x1390/0x2a60 kernel/sched/deadline.c:1995 dl_server_start+0xb9/0x700 kernel/sched/deadline.c:1650 enqueue_task_fair+0x550/0xfb0 kernel/sched/fair.c:7044 enqueue_task+0x7b/0x3e0 kernel/sched/core.c:2020 activate_task+0x54/0xd0 kernel/sched/core.c:2067 attach_task+0x116/0x1b0 kernel/sched/fair.c:9641 attach_tasks kernel/sched/fair.c:9676 [inline] sched_balance_rq+0x1456/0x2ec0 kernel/sched/fair.c:11753 sched_balance_newidle+0x6bb/0x1190 kernel/sched/fair.c:12795 pick_next_task_fair+0x50/0x1280 kernel/sched/fair.c:8943 __pick_next_task+0xf1/0x6c0 kernel/sched/core.c:5971 pick_next_task kernel/sched/core.c:6069 [inline] __schedule+0x42c/0x5740 kernel/sched/core.c:6647 __schedule_loop kernel/sched/core.c:6770 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6785 worker_thread+0x2de/0xf00 kernel/workqueue.c:3406 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 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/1:2/1210: #0: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_release include/linux/rcupdate.h:347 [inline] #0: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_unlock include/linux/rcupdate.h:880 [inline] #0: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: sched_balance_newidle+0x47c/0x1190 kernel/sched/fair.c:12777 #1: ffff8880b873eed8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 #2: ffffffff8e1a5ac0 (console_lock){+.+.}-{0:0}, at: vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:68 #3: ffffffff8e1a5b30 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:342 [inline] #3: ffffffff8e1a5b30 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:267 [inline] #3: ffffffff8e1a5b30 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:288 [inline] #3: ffffffff8e1a5b30 (console_srcu){....}-{0:0}, at: console_flush_all+0x159/0xc60 kernel/printk/printk.c:3157 stack backtrace: CPU: 1 UID: 0 PID: 1210 Comm: kworker/1:2 Not tainted 6.12.0-rc7-syzkaller-00216-gf66d6acccbc0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Workqueue: 0x0 (events) Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x41c/0x610 kernel/locking/lockdep.c:2074 check_noncircular+0x31a/0x400 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+0x250b/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 console_lock_spinning_enable+0xb0/0xd0 kernel/printk/printk.c:1905 console_emit_next_record kernel/printk/printk.c:3086 [inline] console_flush_all+0x7ac/0xc60 kernel/printk/printk.c:3180 __console_flush_and_unlock kernel/printk/printk.c:3239 [inline] console_unlock+0xd9/0x210 kernel/printk/printk.c:3279 vprintk_emit+0x424/0x6f0 kernel/printk/printk.c:2407 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:68 _printk+0xc8/0x100 kernel/printk/printk.c:2432 __report_bug lib/bug.c:195 [inline] report_bug+0x4ac/0x580 lib/bug.c:219 handle_bug+0x54/0xa0 arch/x86/kernel/traps.c:285 exc_invalid_op+0x17/0x50 arch/x86/kernel/traps.c:309 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 RIP: 0010:enqueue_dl_entity+0x1390/0x2a60 kernel/sched/deadline.c:1995 Code: f1 ff ff 44 8b 1c 24 45 85 db 0f 84 07 fa ff ff 48 83 c4 28 44 89 e6 48 89 cf 5b 5d 41 5c 41 5d 41 5e 41 5f e9 61 67 ff ff 90 <0f> 0b 90 e9 a0 ec ff ff 90 0f 0b 90 e9 44 f3 ff ff 45 84 f6 0f 85 RSP: 0018:ffffc9000467f700 EFLAGS: 00010082 RAX: dffffc0000000000 RBX: ffff8880b873f8a8 RCX: ffff8880b873f8a8 RDX: 1ffff110170e7f15 RSI: 0000000000000001 RDI: ffff8880b873f8a8 RBP: ffff8880b873f8fc R08: 0000000000000001 R09: 0000000000000000 R10: ffffffff905f854f R11: 0000000000000000 R12: 0000000000000001 R13: ffff8880b873eec0 R14: 000000000016e360 R15: dffffc0000000000 dl_server_start+0xb9/0x700 kernel/sched/deadline.c:1650 enqueue_task_fair+0x550/0xfb0 kernel/sched/fair.c:7044 enqueue_task+0x7b/0x3e0 kernel/sched/core.c:2020 activate_task+0x54/0xd0 kernel/sched/core.c:2067 attach_task+0x116/0x1b0 kernel/sched/fair.c:9641 attach_tasks kernel/sched/fair.c:9676 [inline] sched_balance_rq+0x1456/0x2ec0 kernel/sched/fair.c:11753 sched_balance_newidle+0x6bb/0x1190 kernel/sched/fair.c:12795 pick_next_task_fair+0x50/0x1280 kernel/sched/fair.c:8943 __pick_next_task+0xf1/0x6c0 kernel/sched/core.c:5971 pick_next_task kernel/sched/core.c:6069 [inline] __schedule+0x42c/0x5740 kernel/sched/core.c:6647 __schedule_loop kernel/sched/core.c:6770 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6785 worker_thread+0x2de/0xf00 kernel/workqueue.c:3406 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 WARNING: CPU: 1 PID: 1210 at kernel/sched/deadline.c:1995 enqueue_dl_entity+0x1390/0x2a60 kernel/sched/deadline.c:1995 Modules linked in: CPU: 1 UID: 0 PID: 1210 Comm: kworker/1:2 Not tainted 6.12.0-rc7-syzkaller-00216-gf66d6acccbc0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Workqueue: 0x0 (events) RIP: 0010:enqueue_dl_entity+0x1390/0x2a60 kernel/sched/deadline.c:1995 Code: f1 ff ff 44 8b 1c 24 45 85 db 0f 84 07 fa ff ff 48 83 c4 28 44 89 e6 48 89 cf 5b 5d 41 5c 41 5d 41 5e 41 5f e9 61 67 ff ff 90 <0f> 0b 90 e9 a0 ec ff ff 90 0f 0b 90 e9 44 f3 ff ff 45 84 f6 0f 85 RSP: 0018:ffffc9000467f700 EFLAGS: 00010082 RAX: dffffc0000000000 RBX: ffff8880b873f8a8 RCX: ffff8880b873f8a8 RDX: 1ffff110170e7f15 RSI: 0000000000000001 RDI: ffff8880b873f8a8 RBP: ffff8880b873f8fc R08: 0000000000000001 R09: 0000000000000000 R10: ffffffff905f854f R11: 0000000000000000 R12: 0000000000000001 R13: ffff8880b873eec0 R14: 000000000016e360 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f82a4910d58 CR3: 000000000df7c000 CR4: 0000000000350ef0 Call Trace: dl_server_start+0xb9/0x700 kernel/sched/deadline.c:1650 enqueue_task_fair+0x550/0xfb0 kernel/sched/fair.c:7044 enqueue_task+0x7b/0x3e0 kernel/sched/core.c:2020 activate_task+0x54/0xd0 kernel/sched/core.c:2067 attach_task+0x116/0x1b0 kernel/sched/fair.c:9641 attach_tasks kernel/sched/fair.c:9676 [inline] sched_balance_rq+0x1456/0x2ec0 kernel/sched/fair.c:11753 sched_balance_newidle+0x6bb/0x1190 kernel/sched/fair.c:12795 pick_next_task_fair+0x50/0x1280 kernel/sched/fair.c:8943 __pick_next_task+0xf1/0x6c0 kernel/sched/core.c:5971 pick_next_task kernel/sched/core.c:6069 [inline] __schedule+0x42c/0x5740 kernel/sched/core.c:6647 __schedule_loop kernel/sched/core.c:6770 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6785 worker_thread+0x2de/0xf00 kernel/workqueue.c:3406 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244