============================================ WARNING: possible recursive locking detected 5.16.0-rc3-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/4488 is trying to acquire lock: ffffffff90f553f0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0xfe/0x920 drivers/tty/serial/serial_core.c:577 but task is already holding lock: ffffffff90f553f0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq+0x3f/0x3e0 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 syz-executor.3/4488: #0: ffff888080f75d30 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #0: ffff888080f75d30 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x39/0x1e0 drivers/tty/serial/8250/8250_core.c:116 #1: ffffffff90f553f0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq+0x3f/0x3e0 drivers/tty/serial/8250/8250_port.c:1908 #2: ffff888089465098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x18/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 1 PID: 4488 Comm: syz-executor.3 Not tainted 5.16.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:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2956 [inline] check_deadlock kernel/locking/lockdep.c:2999 [inline] validate_chain+0x5984/0x8240 kernel/locking/lockdep.c:3788 __lock_acquire+0x1382/0x2b00 kernel/locking/lockdep.c:5027 lock_acquire+0x19f/0x4d0 kernel/locking/lockdep.c:5637 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 uart_write+0xfe/0x920 drivers/tty/serial/serial_core.c:577 n_hdlc_send_frames+0x34e/0xb20 drivers/tty/n_hdlc.c:290 tty_wakeup+0xb3/0xf0 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x68e/0x8a0 drivers/tty/serial/8250/8250_port.c:1845 serial8250_handle_irq+0x2fd/0x3e0 drivers/tty/serial/8250/8250_port.c:1932 serial8250_default_handle_irq+0xaf/0x190 drivers/tty/serial/8250/8250_port.c:1949 serial8250_interrupt+0xa3/0x1e0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x20d/0x730 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:198 [inline] handle_irq_event+0x10a/0x300 kernel/irq/handle.c:215 handle_edge_irq+0x245/0xbe0 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+0xce/0x1e0 arch/x86/kernel/irq.c:250 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 a2 a6 bb f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 47 70 45 f7 65 8b 05 58 ca ed 75 85 c0 74 3f 48 c7 04 24 0e 36 RSP: 0018:ffffc90003befb40 EFLAGS: 00000206 RAX: e6648180c708ab00 RBX: 1ffff9200077df6c RCX: ffffffff90bb2903 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffffc90003befbd0 R08: ffffffff818b14d0 R09: ffffed1003180a25 R10: ffffed1003180a25 R11: 0000000000000000 R12: dffffc0000000000 R13: 1ffff9200077df68 R14: ffffc90003befb60 R15: 0000000000000246 do_wait+0xf5/0x9d0 kernel/exit.c:1497 kernel_wait4+0x2a3/0x3c0 kernel/exit.c:1684 __do_sys_wait4 kernel/exit.c:1712 [inline] __se_sys_wait4 kernel/exit.c:1708 [inline] __x64_sys_wait4+0x130/0x1e0 kernel/exit.c:1708 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f9d5a045f87 Code: 89 7c 24 10 48 89 4c 24 18 e8 35 50 02 00 4c 8b 54 24 18 8b 54 24 14 41 89 c0 48 8b 74 24 08 8b 7c 24 10 b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 89 44 24 10 e8 65 50 02 00 8b 44 RSP: 002b:00007ffe4e0040b0 EFLAGS: 00000293 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 000000000000042e RCX: 00007f9d5a045f87 RDX: 0000000040000001 RSI: 00007ffe4e00413c RDI: 00000000ffffffff RBP: 00007ffe4e00413c R08: 0000000000000000 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000182401 R14: 0000000000000005 R15: 00007ffe4e0041a0 ---------------- Code disassembly (best guess): 0: 9c pushfq 1: 8f 44 24 20 popq 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 a2 a6 bb f7 callq 0xf7bba6b6 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 4e jne 0x69 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 47 70 45 f7 callq 0xf7457076 <-- trapping instruction 2f: 65 8b 05 58 ca ed 75 mov %gs:0x75edca58(%rip),%eax # 0x75edca8e 36: 85 c0 test %eax,%eax 38: 74 3f je 0x79 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss