------------[ cut here ]------------ ====================================================== WARNING: possible circular locking dependency detected 6.16.0-syzkaller-06574-gd9104cec3e8f #0 Not tainted ------------------------------------------------------ syz.3.685/8287 is trying to acquire lock: ffffffff8e130720 (console_owner){-...}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:336 [inline] ffffffff8e130720 (console_owner){-...}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:346 [inline] ffffffff8e130720 (console_owner){-...}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:288 [inline] ffffffff8e130720 (console_owner){-...}-{0:0}, at: console_flush_all+0x13a/0xc40 kernel/printk/printk.c:3203 but task is already holding lock: ffff8880b8639f58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:636 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 _raw_spin_lock_nested+0x32/0x50 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:636 raw_spin_rq_lock kernel/sched/sched.h:1522 [inline] task_rq_lock+0xbc/0x470 kernel/sched/core.c:736 cgroup_move_task+0x92/0x2a0 kernel/sched/psi.c:1174 css_set_move_task+0x658/0x9e0 kernel/cgroup/cgroup.c:918 cgroup_post_fork+0x1ef/0x790 kernel/cgroup/cgroup.c:6759 copy_process+0x3862/0x3c00 kernel/fork.c:2416 kernel_clone+0x21e/0x840 kernel/fork.c:2602 user_mode_thread+0xdd/0x140 kernel/fork.c:2680 rest_init+0x23/0x300 init/main.c:709 start_kernel+0x3a9/0x410 init/main.c:1097 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:307 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:288 common_startup_64+0x13e/0x147 -> #3 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:557 [inline] try_to_wake_up+0x6e/0x1290 kernel/sched/core.c:4210 __wake_up_common kernel/sched/wait.c:90 [inline] __wake_up_common_lock+0x137/0x1f0 kernel/sched/wait.c:107 tty_port_default_wakeup+0xa2/0xf0 drivers/tty/tty_port.c:69 serial8250_tx_chars+0x72e/0x970 drivers/tty/serial/8250/8250_port.c:1728 serial8250_handle_irq+0x633/0xbb0 drivers/tty/serial/8250/8250_port.c:1836 serial8250_default_handle_irq+0xbf/0x1e0 drivers/tty/serial/8250/8250_port.c:1856 serial8250_interrupt+0x8d/0x160 drivers/tty/serial/8250/8250_core.c:82 __handle_irq_event_percpu+0x289/0x980 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x23b/0x9f0 kernel/irq/chip.c:849 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:254 [inline] call_irq_handler arch/x86/kernel/irq.c:266 [inline] __common_interrupt+0x143/0x250 arch/x86/kernel/irq.c:292 common_interrupt+0xb6/0xe0 arch/x86/kernel/irq.c:285 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 kasan_byte_accessible+0x16/0x30 mm/kasan/generic.c:199 __kasan_check_byte+0x12/0x40 mm/kasan/common.c:556 kasan_check_byte include/linux/kasan.h:399 [inline] lock_acquire+0x8d/0x360 kernel/locking/lockdep.c:5842 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] pgd_alloc+0xf1/0x570 arch/x86/mm/pgtable.c:351 mm_alloc_pgd kernel/fork.c:533 [inline] mm_init+0x5ef/0xef0 kernel/fork.c:1066 bprm_mm_init fs/exec.c:261 [inline] alloc_bprm+0x378/0x5b0 fs/exec.c:1466 do_execveat_common+0x1b3/0x6a0 fs/exec.c:1811 do_execve fs/exec.c:1934 [inline] __do_sys_execve fs/exec.c:2010 [inline] __se_sys_execve fs/exec.c:2005 [inline] __x64_sys_execve+0x94/0xb0 fs/exec.c:2005 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&tty->write_wait){-.-.}-{3:3}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 __wake_up_common_lock+0x2f/0x1f0 kernel/sched/wait.c:106 tty_port_default_wakeup+0xa2/0xf0 drivers/tty/tty_port.c:69 serial8250_tx_chars+0x72e/0x970 drivers/tty/serial/8250/8250_port.c:1728 serial8250_handle_irq+0x633/0xbb0 drivers/tty/serial/8250/8250_port.c:1836 serial8250_default_handle_irq+0xbf/0x1e0 drivers/tty/serial/8250/8250_port.c:1856 serial8250_interrupt+0x8d/0x160 drivers/tty/serial/8250/8250_core.c:82 __handle_irq_event_percpu+0x289/0x980 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x23b/0x9f0 kernel/irq/chip.c:849 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:254 [inline] call_irq_handler arch/x86/kernel/irq.c:266 [inline] __common_interrupt+0x143/0x250 arch/x86/kernel/irq.c:292 common_interrupt+0xb6/0xe0 arch/x86/kernel/irq.c:285 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xa8/0x110 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_port_unlock_irqrestore include/linux/serial_core.h:788 [inline] uart_port_unlock_deref+0x111/0x2f0 drivers/tty/serial/serial_core.c:91 uart_write+0xe8/0x130 drivers/tty/serial/serial_core.c:637 process_output_block drivers/tty/n_tty.c:561 [inline] n_tty_write+0xd32/0x11d0 drivers/tty/n_tty.c:2377 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write+0x503/0x990 drivers/tty/tty_io.c:1081 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x54b/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&port_lock_key){-.-.}-{3:3}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] serial8250_console_write+0x17e/0x1ba0 drivers/tty/serial/8250/8250_port.c:3355 console_emit_next_record kernel/printk/printk.c:3138 [inline] console_flush_all+0x728/0xc40 kernel/printk/printk.c:3226 __console_flush_and_unlock kernel/printk/printk.c:3285 [inline] console_unlock+0xc4/0x270 kernel/printk/printk.c:3325 vprintk_emit+0x5b7/0x7a0 kernel/printk/printk.c:2450 _printk+0xcf/0x120 kernel/printk/printk.c:2475 register_console+0xa8b/0xf90 kernel/printk/printk.c:4125 univ8250_console_init+0x3a/0x70 drivers/tty/serial/8250/8250_core.c:516 console_init+0x10e/0x430 kernel/printk/printk.c:4323 start_kernel+0x254/0x410 init/main.c:1035 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:307 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:288 common_startup_64+0x13e/0x147 -> #0 (console_owner){-...}-{0:0}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 console_lock_spinning_enable kernel/printk/printk.c:1924 [inline] console_emit_next_record kernel/printk/printk.c:3132 [inline] console_flush_all+0x6d2/0xc40 kernel/printk/printk.c:3226 __console_flush_and_unlock kernel/printk/printk.c:3285 [inline] console_unlock+0xc4/0x270 kernel/printk/printk.c:3325 vprintk_emit+0x5b7/0x7a0 kernel/printk/printk.c:2450 _printk+0xcf/0x120 kernel/printk/printk.c:2475 __report_bug lib/bug.c:191 [inline] report_bug+0x34e/0x4f0 lib/bug.c:215 handle_bug+0x84/0x160 arch/x86/kernel/traps.c:338 exc_invalid_op+0x1a/0x50 arch/x86/kernel/traps.c:392 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 cpu_max_bits_warn include/linux/cpumask.h:135 [inline] cpumask_check include/linux/cpumask.h:142 [inline] cpumask_clear_cpu include/linux/cpumask.h:620 [inline] __mm_cid_put kernel/sched/sched.h:3530 [inline] mm_cid_put_lazy kernel/sched/sched.h:3552 [inline] switch_mm_cid kernel/sched/sched.h:3781 [inline] context_switch kernel/sched/core.c:5346 [inline] __schedule+0x19d9/0x4d30 kernel/sched/core.c:6954 __schedule_loop kernel/sched/core.c:7036 [inline] schedule+0x165/0x360 kernel/sched/core.c:7051 futex_do_wait kernel/futex/waitwake.c:358 [inline] __futex_wait+0x1c3/0x3e0 kernel/futex/waitwake.c:687 futex_wait+0x104/0x360 kernel/futex/waitwake.c:715 do_futex+0x333/0x420 kernel/futex/syscalls.c:102 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x36f/0x400 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f 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 *** 3 locks held by syz.3.685/8287: #0: ffff8880b8639f58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:636 #1: ffffffff8e130780 (console_lock){+.+.}-{0:0}, at: _printk+0xcf/0x120 kernel/printk/printk.c:2475 #2: ffffffff8e018050 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:336 [inline] #2: ffffffff8e018050 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:346 [inline] #2: ffffffff8e018050 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:288 [inline] #2: ffffffff8e018050 (console_srcu){....}-{0:0}, at: console_flush_all+0x13a/0xc40 kernel/printk/printk.c:3203 stack backtrace: CPU: 0 UID: 0 PID: 8287 Comm: syz.3.685 Not tainted 6.16.0-syzkaller-06574-gd9104cec3e8f #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2043 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 console_lock_spinning_enable kernel/printk/printk.c:1924 [inline] console_emit_next_record kernel/printk/printk.c:3132 [inline] console_flush_all+0x6d2/0xc40 kernel/printk/printk.c:3226 __console_flush_and_unlock kernel/printk/printk.c:3285 [inline] console_unlock+0xc4/0x270 kernel/printk/printk.c:3325 vprintk_emit+0x5b7/0x7a0 kernel/printk/printk.c:2450 _printk+0xcf/0x120 kernel/printk/printk.c:2475 __report_bug lib/bug.c:191 [inline] report_bug+0x34e/0x4f0 lib/bug.c:215 handle_bug+0x84/0x160 arch/x86/kernel/traps.c:338 exc_invalid_op+0x1a/0x50 arch/x86/kernel/traps.c:392 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 RIP: 0010:cpu_max_bits_warn include/linux/cpumask.h:135 [inline] RIP: 0010:cpumask_check include/linux/cpumask.h:142 [inline] RIP: 0010:cpumask_clear_cpu include/linux/cpumask.h:620 [inline] RIP: 0010:__mm_cid_put kernel/sched/sched.h:3530 [inline] RIP: 0010:mm_cid_put_lazy kernel/sched/sched.h:3552 [inline] RIP: 0010:switch_mm_cid kernel/sched/sched.h:3781 [inline] RIP: 0010:context_switch kernel/sched/core.c:5346 [inline] RIP: 0010:__schedule+0x19d9/0x4d30 kernel/sched/core.c:6954 Code: ff 4c 89 ff 48 83 c7 18 8b b4 24 b8 01 00 00 e8 4d d0 2c f6 4c 89 ff e8 d5 ae 20 f6 4c 89 ff e8 bd 8d 21 f6 e9 67 fd ff ff 90 <0f> 0b 90 e9 90 fb ff ff c6 05 3f b1 19 04 01 90 48 c7 c7 20 65 8a RSP: 0018:ffffc9001ca8f7a0 EFLAGS: 00010016 RAX: 0000000080000020 RBX: 0000000000000020 RCX: 00000000ffffffff RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc9001ca8f8e0 RBP: ffffc9001ca8f9d8 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52003951f1c R12: ffff88801d293c00 R13: dffffc0000000000 R14: ffff88802ab59e00 R15: ffff888029386010 __schedule_loop kernel/sched/core.c:7036 [inline] schedule+0x165/0x360 kernel/sched/core.c:7051 futex_do_wait kernel/futex/waitwake.c:358 [inline] __futex_wait+0x1c3/0x3e0 kernel/futex/waitwake.c:687 futex_wait+0x104/0x360 kernel/futex/waitwake.c:715 do_futex+0x333/0x420 kernel/futex/syscalls.c:102 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x36f/0x400 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4fc798eb69 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:00007f4fc88440e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f4fc7bb5fa8 RCX: 00007f4fc798eb69 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f4fc7bb5fa8 RBP: 00007f4fc7bb5fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4fc7bb5fac R13: 0000000000000000 R14: 00007ffea05df6d0 R15: 00007ffea05df7b8 WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 cpu_max_bits_warn include/linux/cpumask.h:135 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 cpumask_check include/linux/cpumask.h:142 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 cpumask_clear_cpu include/linux/cpumask.h:620 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 __mm_cid_put kernel/sched/sched.h:3530 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 mm_cid_put_lazy kernel/sched/sched.h:3552 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 switch_mm_cid kernel/sched/sched.h:3781 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 context_switch kernel/sched/core.c:5346 [inline] WARNING: CPU: 0 PID: 8287 at ./include/linux/cpumask.h:135 __schedule+0x19d9/0x4d30 kernel/sched/core.c:6954 Modules linked in: CPU: 0 UID: 0 PID: 8287 Comm: syz.3.685 Not tainted 6.16.0-syzkaller-06574-gd9104cec3e8f #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:cpu_max_bits_warn include/linux/cpumask.h:135 [inline] RIP: 0010:cpumask_check include/linux/cpumask.h:142 [inline] RIP: 0010:cpumask_clear_cpu include/linux/cpumask.h:620 [inline] RIP: 0010:__mm_cid_put kernel/sched/sched.h:3530 [inline] RIP: 0010:mm_cid_put_lazy kernel/sched/sched.h:3552 [inline] RIP: 0010:switch_mm_cid kernel/sched/sched.h:3781 [inline] RIP: 0010:context_switch kernel/sched/core.c:5346 [inline] RIP: 0010:__schedule+0x19d9/0x4d30 kernel/sched/core.c:6954 Code: ff 4c 89 ff 48 83 c7 18 8b b4 24 b8 01 00 00 e8 4d d0 2c f6 4c 89 ff e8 d5 ae 20 f6 4c 89 ff e8 bd 8d 21 f6 e9 67 fd ff ff 90 <0f> 0b 90 e9 90 fb ff ff c6 05 3f b1 19 04 01 90 48 c7 c7 20 65 8a RSP: 0018:ffffc9001ca8f7a0 EFLAGS: 00010016 RAX: 0000000080000020 RBX: 0000000000000020 RCX: 00000000ffffffff RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc9001ca8f8e0 RBP: ffffc9001ca8f9d8 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52003951f1c R12: ffff88801d293c00 R13: dffffc0000000000 R14: ffff88802ab59e00 R15: ffff888029386010 FS: 00007f4fc88446c0(0000) GS:ffff888125c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000004f8b6000 CR4: 00000000003526f0 Call Trace: __schedule_loop kernel/sched/core.c:7036 [inline] schedule+0x165/0x360 kernel/sched/core.c:7051 futex_do_wait kernel/futex/waitwake.c:358 [inline] __futex_wait+0x1c3/0x3e0 kernel/futex/waitwake.c:687 futex_wait+0x104/0x360 kernel/futex/waitwake.c:715 do_futex+0x333/0x420 kernel/futex/syscalls.c:102 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x36f/0x400 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4fc798eb69 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:00007f4fc88440e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f4fc7bb5fa8 RCX: 00007f4fc798eb69 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f4fc7bb5fa8 RBP: 00007f4fc7bb5fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4fc7bb5fac R13: 0000000000000000 R14: 00007ffea05df6d0 R15: 00007ffea05df7b8