============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.5/24225 is trying to acquire lock: 00000000abe0248e (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 00000000abe0248e (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 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.5/24225: #0: 00000000d564b868 (&mm->mmap_sem){++++}, at: __do_page_fault+0x398/0xd60 arch/x86/mm/fault.c:1341 #1: 00000000ad8aae5f (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #1: 00000000ad8aae5f (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #2: 00000000abe0248e (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 #3: 00000000ec5b1db6 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 1 PID: 24225 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline] check_deadlock kernel/locking/lockdep.c:1808 [inline] validate_chain kernel/locking/lockdep.c:2404 [inline] __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403 n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479 tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 serial8250_tx_chars+0x490/0xaf0 drivers/tty/serial/8250/8250_port.c:1813 serial8250_handle_irq.part.0+0x31f/0x3d0 drivers/tty/serial/8250/8250_port.c:1900 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1873 [inline] serial8250_default_handle_irq+0xae/0x220 drivers/tty/serial/8250/8250_port.c:1916 serial8250_interrupt+0x101/0x240 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0x27e/0x8e0 kernel/irq/handle.c:149 handle_irq_event_percpu kernel/irq/handle.c:189 [inline] handle_irq_event+0x102/0x290 kernel/irq/handle.c:206 handle_edge_irq+0x260/0xcf0 kernel/irq/chip.c:800 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1c0 arch/x86/kernel/irq.c:246 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:copy_page+0x7/0x10 arch/x86/lib/copy_page_64.S:19 Code: e9 86 fa ff ff 48 8b 7c 24 10 e8 34 51 a7 f9 e9 3f fe ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 b9 00 02 00 00 48 a5 c3 0f 1f 44 00 00 48 83 ec 10 48 89 1c 24 4c 89 64 24 08 RSP: 0000:ffff88804a70fa50 EFLAGS: 00010286 ORIG_RAX: ffffffffffffffd5 RAX: ffff888000000000 RBX: ffff8880421983c0 RCX: 00000000000001f8 RDX: 1ffff110084332ef RSI: ffff888038b9c040 RDI: ffff88803899c040 RBP: ffff888038b9c000 R08: 0000000000000200 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000200 R12: ffffea0000e26700 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 copy_user_page arch/x86/include/asm/page.h:34 [inline] copy_user_highpage include/linux/highmem.h:233 [inline] copy_subpage.constprop.0+0x12d/0x240 mm/memory.c:4895 process_huge_page mm/memory.c:4803 [inline] copy_user_huge_page+0x136/0x770 mm/memory.c:4917 do_huge_pmd_wp_page+0xb37/0x5370 mm/huge_memory.c:1387 wp_huge_pmd mm/memory.c:4076 [inline] __handle_mm_fault+0x2297/0x41c0 mm/memory.c:4289 handle_mm_fault+0x436/0xb10 mm/memory.c:4336 __do_page_fault+0x68e/0xd60 arch/x86/mm/fault.c:1412 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1205 RIP: 0033:0x7f41c9b4a2aa Code: 30 48 8b 34 24 48 85 f6 74 17 8b 44 24 18 0f c8 89 c0 48 89 44 24 18 48 83 fe 01 0f 85 a1 01 00 00 48 8b 44 24 10 8b 74 24 18 <89> 30 e9 d2 fc ff ff 48 8b 44 24 10 8b 10 48 8b 04 24 48 85 c0 0f RSP: 002b:00007ffcb472c010 EFLAGS: 00010246 RAX: 0000000020000280 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 7ac2daf9f7758c9b RSI: 0000000000000003 RDI: 00005555559a92e8 RBP: 00007ffcb472c108 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f41c971fd68 R11: 0000000000000246 R12: 0000000000068e37 R13: 00007ffcb472c130 R14: 00007f41c9ccb050 R15: 0000000000000032 ---------------- Code disassembly (best guess): 0: e9 86 fa ff ff jmpq 0xfffffa8b 5: 48 8b 7c 24 10 mov 0x10(%rsp),%rdi a: e8 34 51 a7 f9 callq 0xf9a75143 f: e9 3f fe ff ff jmpq 0xfffffe53 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: 90 nop 23: 66 90 xchg %ax,%ax 25: b9 00 02 00 00 mov $0x200,%ecx * 2a: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2d: c3 retq 2e: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 33: 48 83 ec 10 sub $0x10,%rsp 37: 48 89 1c 24 mov %rbx,(%rsp) 3b: 4c 89 64 24 08 mov %r12,0x8(%rsp)