============================================
WARNING: possible recursive locking detected
4.14.304-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.3/11121 is trying to acquire lock:
 (&port_lock_key){-.-.}, at: [<ffffffff835af489>] uart_write+0x109/0x560 drivers/tty/serial/serial_core.c:611

but task is already holding lock:
 (&port_lock_key){-.-.}, at: [<ffffffff835ca920>] serial8250_handle_irq.part.0+0x20/0x390 drivers/tty/serial/8250/8250_port.c:1894

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

4 locks held by syz-executor.3/11121:
 #0:  (&u->iolock){+.+.}, at: [<ffffffff8632d834>] unix_dgram_recvmsg+0x1e4/0xc60 net/unix/af_unix.c:2146
 #1:  (&(&i->lock)->rlock){-.-.}, at: [<ffffffff835b7caa>] spin_lock include/linux/spinlock.h:317 [inline]
 #1:  (&(&i->lock)->rlock){-.-.}, at: [<ffffffff835b7caa>] serial8250_interrupt+0x3a/0x210 drivers/tty/serial/8250/8250_core.c:119
 #2:  (&port_lock_key){-.-.}, at: [<ffffffff835ca920>] serial8250_handle_irq.part.0+0x20/0x390 drivers/tty/serial/8250/8250_port.c:1894
 #3:  (&tty->ldisc_sem){++++}, at: [<ffffffff8355ceab>] tty_ldisc_ref+0x1b/0x80 drivers/tty/tty_ldisc.c:305

stack backtrace:
CPU: 1 PID: 11121 Comm: syz-executor.3 Not tainted 4.14.304-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_deadlock_bug kernel/locking/lockdep.c:1800 [inline]
 check_deadlock kernel/locking/lockdep.c:1847 [inline]
 validate_chain kernel/locking/lockdep.c:2448 [inline]
 __lock_acquire.cold+0x180/0x97c kernel/locking/lockdep.c:3491
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:160
 uart_write+0x109/0x560 drivers/tty/serial/serial_core.c:611
 n_hdlc_send_frames+0x241/0x410 drivers/tty/n_hdlc.c:404
 n_hdlc_tty_wakeup+0x95/0xb0 drivers/tty/n_hdlc.c:480
 tty_wakeup+0xc3/0xf0 drivers/tty/tty_io.c:533
 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:49
 serial8250_tx_chars+0x3fe/0xc70 drivers/tty/serial/8250/8250_port.c:1828
 serial8250_handle_irq.part.0+0x2c7/0x390 drivers/tty/serial/8250/8250_port.c:1918
 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1891 [inline]
 serial8250_default_handle_irq+0x8a/0x1f0 drivers/tty/serial/8250/8250_port.c:1934
 serial8250_interrupt+0xf3/0x210 drivers/tty/serial/8250/8250_core.c:129
 __handle_irq_event_percpu+0xee/0x7f0 kernel/irq/handle.c:147
 handle_irq_event_percpu kernel/irq/handle.c:187 [inline]
 handle_irq_event+0xed/0x240 kernel/irq/handle.c:204
 handle_edge_irq+0x224/0xc40 kernel/irq/chip.c:770
 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline]
 handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87
 do_IRQ+0x93/0x1d0 arch/x86/kernel/irq.c:230
 common_interrupt+0x93/0x93 arch/x86/entry/entry_64.S:578
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline]
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:192
RSP: 0018:ffff8880461cf858 EFLAGS: 00000282 ORIG_RAX: ffffffffffffffc8
RAX: 1ffffffff11e13d9 RBX: 0000000000000282 RCX: 1ffff11008d7b1d5
RDX: dffffc0000000000 RSI: ffff888046bd8e88 RDI: 0000000000000282
RBP: ffff8880aa3c0700 R08: ffff8880ba434d30 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000304 R15: 1ffff11008c39f10
 spin_unlock_irqrestore include/linux/spinlock.h:372 [inline]
 __wake_up_common_lock+0xcd/0x140 kernel/sched/wait.c:127
 unix_dgram_recvmsg+0x27d/0xc60 net/unix/af_unix.c:2172
 ___sys_recvmsg+0x20b/0x4d0 net/socket.c:2221
 __sys_recvmmsg+0x1f3/0x5d0 net/socket.c:2329
 SYSC_recvmmsg net/socket.c:2405 [inline]
 SyS_recvmmsg+0x125/0x140 net/socket.c:2394
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f7eb506d0c9
RSP: 002b:00007f7eb35be168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f7eb518d050 RCX: 00007f7eb506d0c9
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007f7eb50c8ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffded46e8bf R14: 00007f7eb35be300 R15: 0000000000022000