============================================ WARNING: possible recursive locking detected 5.15.0-syzkaller #0 Not tainted -------------------------------------------- kworker/1:0/20 is trying to acquire lock: ffffffff90536f90 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:570 but task is already holding lock: ffffffff90536f90 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&port_lock_key); lock(&port_lock_key); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by kworker/1:0/20: #0: ffff88806dd623b0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #0: ffff88806dd623b0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116 #1: ffffffff90536f90 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 #2: ffff88801d724098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 1 PID: 20 Comm: kworker/1:0 Not tainted 5.15.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: 0x0 (events) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2944 [inline] check_deadlock kernel/locking/lockdep.c:2987 [inline] validate_chain kernel/locking/lockdep.c:3776 [inline] __lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:570 n_hdlc_send_frames+0x24b/0x490 drivers/tty/n_hdlc.c:290 tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x4f3/0xad0 drivers/tty/serial/8250/8250_port.c:1845 serial8250_handle_irq.part.0+0x328/0x3d0 drivers/tty/serial/8250/8250_port.c:1932 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1905 [inline] serial8250_default_handle_irq+0xb2/0x220 drivers/tty/serial/8250/8250_port.c:1949 serial8250_interrupt+0xfd/0x200 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x303/0x8f0 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:198 [inline] handle_irq_event+0x102/0x280 kernel/irq/handle.c:215 handle_edge_irq+0x25f/0xd00 kernel/irq/chip.c:822 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0x9d/0x210 arch/x86/kernel/irq.c:250 common_interrupt+0x9f/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0010:finish_task_switch.isra.0+0x323/0xb80 kernel/sched/core.c:4849 Code: 93 f7 e4 07 85 c0 75 02 0f 0b 48 85 db 0f 85 25 01 00 00 4c 89 f7 e8 fc f7 ff ff e8 a7 2e 2d 00 fb 65 48 8b 1c 25 40 f0 01 00 <48> 8d bb 80 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc90000fbfcb0 EFLAGS: 00000206 RAX: 0000000000784365 RBX: ffff888011ca0240 RCX: 1ffffffff1adcfe1 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90000fbfcf8 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff817cd888 R11: 0000000000000001 R12: ffff8880b9d32858 R13: ffff88803387a180 R14: ffff8880b9d31b00 R15: ffff8880b9d32538 context_switch kernel/sched/core.c:4972 [inline] __schedule+0xaa2/0x4940 kernel/sched/core.c:6250 schedule+0xd2/0x260 kernel/sched/core.c:6323 worker_thread+0x15c/0x11f0 kernel/workqueue.c:2465 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: e4 07 in $0x7,%al 2: 85 c0 test %eax,%eax 4: 75 02 jne 0x8 6: 0f 0b ud2 8: 48 85 db test %rbx,%rbx b: 0f 85 25 01 00 00 jne 0x136 11: 4c 89 f7 mov %r14,%rdi 14: e8 fc f7 ff ff callq 0xfffff815 19: e8 a7 2e 2d 00 callq 0x2d2ec5 1e: fb sti 1f: 65 48 8b 1c 25 40 f0 mov %gs:0x1f040,%rbx 26: 01 00 * 28: 48 8d bb 80 15 00 00 lea 0x1580(%rbx),%rdi <-- trapping instruction 2f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 36: fc ff df 39: 48 89 fa mov %rdi,%rdx 3c: 48 rex.W 3d: c1 .byte 0xc1