====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.5.1586/13090 is trying to acquire lock: ffff888019ed6358 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0x5c/0x1080 kernel/sched/core.c:4111 but task is already holding lock: ffff888024840e20 (&port->delta_msr_wait){-...}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] ffff888024840e20 (&port->delta_msr_wait){-...}-{2:2}, at: __wake_up+0xf4/0x190 kernel/sched/wait.c:160 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&port->delta_msr_wait){-...}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xf4/0x190 kernel/sched/wait.c:160 serial8250_modem_status+0x20a/0x290 drivers/tty/serial/8250/8250_port.c:1885 serial8250_handle_irq+0x45e/0x6d0 drivers/tty/serial/8250/8250_port.c:1958 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1981 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x298/0xa30 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x87/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_update_mctrl drivers/tty/serial/serial_core.c:164 [inline] uart_tiocmset+0x22e/0x2c0 drivers/tty/serial/serial_core.c:1104 tty_tiocmset drivers/tty/tty_io.c:2558 [inline] tty_ioctl+0x95d/0xba0 drivers/tty/tty_io.c:2751 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #3 (&port_lock_key){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 serial8250_console_write+0x169/0x17a0 drivers/tty/serial/8250/8250_port.c:3432 call_console_driver kernel/printk/printk.c:1977 [inline] console_emit_next_record+0x947/0xc90 kernel/printk/printk.c:2777 console_flush_all kernel/printk/printk.c:-1 [inline] console_unlock+0x223/0x630 kernel/printk/printk.c:2906 vprintk_emit+0x489/0x680 kernel/printk/printk.c:2303 _printk+0xcc/0x110 kernel/printk/printk.c:2328 register_console+0x6c6/0x9c0 kernel/printk/printk.c:3269 univ8250_console_init+0x41/0x43 drivers/tty/serial/8250/8250_core.c:687 console_init+0x1bc/0x78e kernel/printk/printk.c:3359 start_kernel+0x303/0x539 init/main.c:1088 secondary_startup_64_no_verify+0xcf/0xdb -> #2 (console_owner){-.-.}-{0:0}: console_lock_spinning_enable kernel/printk/printk.c:1818 [inline] console_emit_next_record+0x84c/0xc90 kernel/printk/printk.c:2774 console_flush_all kernel/printk/printk.c:-1 [inline] console_unlock+0x223/0x630 kernel/printk/printk.c:2906 vprintk_emit+0x489/0x680 kernel/printk/printk.c:2303 _printk+0xcc/0x110 kernel/printk/printk.c:2328 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x37a/0x4d0 lib/fault-inject.c:147 strncpy_from_user+0x32/0x350 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x6d/0x140 mm/maccess.c:186 bpf_trace_copy_string kernel/bpf/helpers.c:746 [inline] bpf_bprintf_prepare+0xba0/0x13d0 kernel/bpf/helpers.c:971 ____bpf_trace_printk kernel/trace/bpf_trace.c:384 [inline] bpf_trace_printk+0xd8/0x190 kernel/trace/bpf_trace.c:374 0xffffffffa0006f09 bpf_dispatcher_nop_func include/linux/bpf.h:1012 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline] bpf_trace_run2+0x1cd/0x3b0 kernel/trace/bpf_trace.c:2324 trace_contention_begin+0x142/0x190 include/trace/events/lock.h:95 __pv_queued_spin_lock_slowpath+0xdc/0x9c0 kernel/locking/qspinlock.c:405 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline] queued_spin_lock_slowpath+0x43/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x217/0x280 kernel/locking/spinlock_debug.c:115 raw_spin_rq_lock_nested+0xa5/0x140 kernel/sched/core.c:545 raw_spin_rq_lock kernel/sched/sched.h:1355 [inline] rq_lock kernel/sched/sched.h:1645 [inline] __schedule+0x2ed/0x40b0 kernel/sched/core.c:6477 preempt_schedule_irq+0xb1/0x150 kernel/sched/core.c:6873 irqentry_exit+0x63/0x70 kernel/entry/common.c:439 asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:696 trace_lock_acquire include/trace/events/lock.h:24 [inline] lock_acquire+0xe3/0x490 kernel/locking/lockdep.c:5633 __fs_reclaim_acquire mm/page_alloc.c:4719 [inline] fs_reclaim_acquire+0x6d/0x100 mm/page_alloc.c:4733 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x310 mm/slab.h:710 slab_alloc_node mm/slub.c:3279 [inline] slab_alloc mm/slub.c:3367 [inline] __kmem_cache_alloc_lru mm/slub.c:3374 [inline] kmem_cache_alloc+0x56/0x2f0 mm/slub.c:3383 getname_flags+0xb7/0x500 fs/namei.c:139 __do_sys_execve fs/exec.c:2129 [inline] __se_sys_execve fs/exec.c:2124 [inline] __x64_sys_execve+0x74/0xa0 fs/exec.c:2124 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x2e/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537 raw_spin_rq_lock kernel/sched/sched.h:1355 [inline] rq_lock kernel/sched/sched.h:1645 [inline] task_fork_fair+0x5c/0x350 kernel/sched/fair.c:11901 sched_cgroup_fork+0x32c/0x3c0 kernel/sched/core.c:4685 copy_process+0x24b8/0x4020 kernel/fork.c:2459 kernel_clone+0x225/0x8b0 kernel/fork.c:2757 user_mode_thread+0xda/0x130 kernel/fork.c:2833 rest_init+0x23/0x300 init/main.c:710 start_kernel+0x0/0x539 init/main.c:905 start_kernel+0x490/0x539 init/main.c:1152 secondary_startup_64_no_verify+0xcf/0xdb -> #0 (&p->pi_lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 try_to_wake_up+0x5c/0x1080 kernel/sched/core.c:4111 __wake_up_common+0x2a4/0x4e0 kernel/sched/wait.c:107 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x10e/0x190 kernel/sched/wait.c:160 serial8250_modem_status+0x20a/0x290 drivers/tty/serial/8250/8250_port.c:1885 serial8250_handle_irq+0x45e/0x6d0 drivers/tty/serial/8250/8250_port.c:1958 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1981 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x298/0xa30 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x87/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_update_mctrl drivers/tty/serial/serial_core.c:164 [inline] uart_tiocmset+0x22e/0x2c0 drivers/tty/serial/serial_core.c:1104 tty_tiocmset drivers/tty/tty_io.c:2558 [inline] tty_ioctl+0x95d/0xba0 drivers/tty/tty_io.c:2751 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: &p->pi_lock --> &port_lock_key --> &port->delta_msr_wait Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&port->delta_msr_wait); lock(&port_lock_key); lock(&port->delta_msr_wait); lock(&p->pi_lock); *** DEADLOCK *** 4 locks held by syz.5.1586/13090: #0: ffff888024840ed8 (&port->mutex){+.+.}-{3:3}, at: uart_tiocmset+0x54/0x2c0 drivers/tty/serial/serial_core.c:1098 #1: ffff888029c0ac30 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffff888029c0ac30 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3e/0x1c0 drivers/tty/serial/8250/8250_core.c:116 #2: ffffffff96f70fa8 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq+0x7a/0x6d0 drivers/tty/serial/8250/8250_port.c:1932 #3: ffff888024840e20 (&port->delta_msr_wait){-...}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline] #3: ffff888024840e20 (&port->delta_msr_wait){-...}-{2:2}, at: __wake_up+0xf4/0x190 kernel/sched/wait.c:160 stack backtrace: CPU: 0 PID: 13090 Comm: syz.5.1586 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 try_to_wake_up+0x5c/0x1080 kernel/sched/core.c:4111 __wake_up_common+0x2a4/0x4e0 kernel/sched/wait.c:107 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x10e/0x190 kernel/sched/wait.c:160 serial8250_modem_status+0x20a/0x290 drivers/tty/serial/8250/8250_port.c:1885 serial8250_handle_irq+0x45e/0x6d0 drivers/tty/serial/8250/8250_port.c:1958 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1981 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x298/0xa30 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x87/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 Code: 74 05 e8 ce 48 65 f7 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 f6 cd 35 f7 65 8b 05 77 85 e0 75 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc9000ef17dc0 EFLAGS: 00000206 RAX: 3b9cecdac5217300 RBX: 0000000000000a06 RCX: 3b9cecdac5217300 RDX: dffffc0000000000 RSI: ffffffff8a8c0580 RDI: 0000000000000001 RBP: ffffc9000ef17e50 R08: dffffc0000000000 R09: fffffbfff215c453 R10: fffffbfff215c453 R11: 1ffffffff215c452 R12: dffffc0000000000 R13: ffffffff96f710e0 R14: ffffffff96f70f90 R15: 1ffff92001de2fb8 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_update_mctrl drivers/tty/serial/serial_core.c:164 [inline] uart_tiocmset+0x22e/0x2c0 drivers/tty/serial/serial_core.c:1104 tty_tiocmset drivers/tty/tty_io.c:2558 [inline] tty_ioctl+0x95d/0xba0 drivers/tty/tty_io.c:2751 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fbdf478efc9 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:00007fbdf5598038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fbdf49e6090 RCX: 00007fbdf478efc9 RDX: 0000200000000140 RSI: 0000000000005418 RDI: 0000000000000005 RBP: 00007fbdf4811f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbdf49e6128 R14: 00007fbdf49e6090 R15: 00007ffd69db8088 ip6_tunnel: ip6gre1 xmit: Local address not yet configured! ---------------- Code disassembly (best guess): 0: 74 05 je 0x7 2: e8 ce 48 65 f7 call 0xf76548d5 7: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) e: 00 00 10: 9c pushf 11: 8f 44 24 20 pop 0x20(%rsp) 15: f6 44 24 21 02 testb $0x2,0x21(%rsp) 1a: 75 4b jne 0x67 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 f6 cd 35 f7 call 0xf735ce25 <-- trapping instruction 2f: 65 8b 05 77 85 e0 75 mov %gs:0x75e08577(%rip),%eax # 0x75e085ad 36: 85 c0 test %eax,%eax 38: 74 3c je 0x76 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss