============================================ WARNING: possible recursive locking detected 5.6.0-rc3-syzkaller #0 Not tainted -------------------------------------------- swapper/1/0 is trying to acquire lock: ffffffff8ceaee50 (&port_lock_key){-.-.}, at: uart_write+0x1c7/0x680 drivers/tty/serial/serial_core.c:592 but task is already holding lock: ffffffff8ceaee50 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x290 drivers/tty/serial/8250/8250_port.c:1822 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 swapper/1/0: #0: ffff8880a41382b0 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:338 [inline] #0: ffff8880a41382b0 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x27/0x190 drivers/tty/serial/8250/8250_core.c:116 #1: ffffffff8ceaee50 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x290 drivers/tty/serial/8250/8250_port.c:1822 #2: ffff8880a67e7090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:288 stack backtrace: CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2370 [inline] check_deadlock kernel/locking/lockdep.c:2411 [inline] validate_chain kernel/locking/lockdep.c:2954 [inline] __lock_acquire.cold+0x114/0x288 kernel/locking/lockdep.c:3954 lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4484 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:159 uart_write+0x1c7/0x680 drivers/tty/serial/serial_core.c:592 n_hdlc_send_frames+0x283/0x470 drivers/tty/n_hdlc.c:401 n_hdlc_tty_wakeup+0xb5/0xd0 drivers/tty/n_hdlc.c:477 tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:536 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 serial8250_tx_chars+0x48f/0xae0 drivers/tty/serial/8250/8250_port.c:1760 serial8250_handle_irq.part.0+0x24b/0x290 drivers/tty/serial/8250/8250_port.c:1833 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1819 [inline] serial8250_default_handle_irq+0xb5/0x140 drivers/tty/serial/8250/8250_port.c:1849 serial8250_interrupt+0xe6/0x190 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x15d/0x950 kernel/irq/handle.c:149 handle_irq_event_percpu+0x76/0x160 kernel/irq/handle.c:189 handle_irq_event+0xa2/0x12d kernel/irq/handle.c:206 handle_edge_irq+0x24b/0x8c0 kernel/irq/chip.c:830 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline] do_IRQ+0xd9/0x280 arch/x86/kernel/irq.c:250 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:607 RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61 Code: cc cc cc cc cc cc cc cc cc cc cc cc e9 07 00 00 00 0f 00 2d 64 3f 4b 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d 54 3f 4b 00 fb f4 cc 41 56 41 55 41 54 55 53 e8 a3 cf a2 f9 e8 7e ff d4 fb 0f 1f RSP: 0018:ffffc90000d3fdb8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffffd7 RAX: 1ffffffff12e7652 RBX: ffff8880a9644340 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffff8880a9644bd4 RBP: dffffc0000000000 R08: ffff8880a9644340 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed10152c8868 R13: 0000000000000001 R14: ffffffff8a65d980 R15: 0000000000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:144 [inline] default_idle+0x49/0x350 arch/x86/kernel/process.c:695 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x393/0x690 kernel/sched/idle.c:269 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:361 start_secondary+0x2ee/0x400 arch/x86/kernel/smpboot.c:264 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242