============================================ WARNING: possible recursive locking detected 4.14.167-syzkaller #0 Not tainted -------------------------------------------- syz-fuzzer/7447 is trying to acquire lock: (&port_lock_key){-.-.}, at: [] uart_write+0x10c/0x4f0 drivers/tty/serial/serial_core.c:604 but task is already holding lock: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.0+0x24/0x250 drivers/tty/serial/8250/8250_port.c:1872 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 syz-fuzzer/7447: #0: (&(&i->lock)->rlock){-.-.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] #0: (&(&i->lock)->rlock){-.-.}, at: [] serial8250_interrupt+0x2c/0x1a0 drivers/tty/serial/8250/8250_core.c:119 #1: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.0+0x24/0x250 drivers/tty/serial/8250/8250_port.c:1872 #2: (&tty->ldisc_sem){++++}, at: [] tty_ldisc_ref+0x20/0x80 drivers/tty/tty_ldisc.c:305 stack backtrace: CPU: 0 PID: 7447 Comm: syz-fuzzer Not tainted 4.14.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_deadlock_bug kernel/locking/lockdep.c:1796 [inline] check_deadlock kernel/locking/lockdep.c:1843 [inline] validate_chain kernel/locking/lockdep.c:2444 [inline] __lock_acquire.cold+0x2bf/0x8dc kernel/locking/lockdep.c:3487 lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:160 uart_write+0x10c/0x4f0 drivers/tty/serial/serial_core.c:604 n_hdlc_send_frames+0x238/0x3e0 drivers/tty/n_hdlc.c:404 n_hdlc_tty_wakeup+0x9f/0xc0 drivers/tty/n_hdlc.c:480 tty_wakeup+0xc9/0x100 drivers/tty/tty_io.c:533 tty_port_default_wakeup+0x2b/0x40 drivers/tty/tty_port.c:49 tty_port_tty_wakeup+0x57/0x70 drivers/tty/tty_port.c:389 uart_write_wakeup+0x46/0x70 drivers/tty/serial/serial_core.c:116 serial8250_tx_chars+0x40d/0xa10 drivers/tty/serial/8250/8250_port.c:1810 serial8250_handle_irq.part.0+0x206/0x250 drivers/tty/serial/8250/8250_port.c:1883 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1869 [inline] serial8250_default_handle_irq+0xa1/0x120 drivers/tty/serial/8250/8250_port.c:1899 serial8250_interrupt+0xe9/0x1a0 drivers/tty/serial/8250/8250_core.c:129 __handle_irq_event_percpu+0x125/0x7f0 kernel/irq/handle.c:147 handle_irq_event_percpu+0x65/0x130 kernel/irq/handle.c:187 handle_irq_event+0xa7/0x134 kernel/irq/handle.c:204 handle_edge_irq+0x22b/0x840 kernel/irq/chip.c:770 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x39/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x99/0x1d0 arch/x86/kernel/irq.c:230 common_interrupt+0x96/0x96 arch/x86/entry/entry_64.S:576 RIP: 0033:0x411e4b RSP: 002b:000000c420149e38 EFLAGS: 00000202 ORIG_RAX: ffffffffffffffc8 RAX: 000000c420000000 RBX: 000000c425d56be0 RCX: 000000c420084480 RDX: 0000000000002eab RSI: 00007f5f078f3a20 RDI: 000000c425d56000 RBP: 000000c420149e80 R08: 0000000000000001 R09: 00000000004c37e0 R10: 0000000000000400 R11: 000000c425d56be0 R12: 0000000000000000 R13: 0000000000000020 R14: 0000000000000013 R15: 0000000000000100