============================================ WARNING: possible recursive locking detected 5.16.0-rc2-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/15403 is trying to acquire lock: ffffffff90f55430 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0xfe/0x920 drivers/tty/serial/serial_core.c:577 but task is already holding lock: ffffffff90f55430 (&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 4 locks held by syz-executor.3/15403: #0: ffff888019380f28 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff888019380f28 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x2d8/0x10c0 arch/x86/mm/fault.c:1338 #1: ffff888071bb30b0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #1: ffff888071bb30b0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x39/0x1e0 drivers/tty/serial/8250/8250_core.c:116 #2: ffffffff90f55430 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq+0x3f/0x3e0 drivers/tty/serial/8250/8250_port.c:1908 #3: ffff8880816ec098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x18/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 1 PID: 15403 Comm: syz-executor.3 Not tainted 5.16.0-rc2-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:clear_page_erms+0x7/0x10 Code: 48 89 47 18 48 89 47 20 48 89 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d9 90 c3 0f 1f 80 00 00 00 00 b9 00 10 00 00 31 c0 aa c3 cc cc cc cc cc cc 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0000:ffffc90004137828 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffea00023a8034 RCX: 0000000000000540 RDX: 000000000000012b RSI: 0005088000000000 RDI: ffff88808ead5ac0 RBP: ffffea00023ab540 R08: dffffc0000000000 R09: ffffed1011d40000 R10: fffff94000475007 R11: 0000000000000000 R12: dffffc0000000000 R13: ffffea00023a8000 R14: 00000000013d20ca R15: 0000000000000009 clear_page arch/x86/include/asm/page_64.h:49 [inline] clear_highpage include/linux/highmem.h:217 [inline] kernel_init_free_pages mm/page_alloc.c:1276 [inline] post_alloc_hook+0x12f/0x260 mm/page_alloc.c:2408 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4149 __alloc_pages+0x255/0x580 mm/page_alloc.c:5369 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_pages_vma+0xbd1/0x1030 mm/mempolicy.c:2133 do_huge_pmd_anonymous_page+0x608/0xd30 mm/huge_memory.c:777 create_huge_pmd mm/memory.c:4422 [inline] __handle_mm_fault mm/memory.c:4657 [inline] handle_mm_fault+0x1fba/0x2560 mm/memory.c:4784 do_user_addr_fault+0x8cc/0x10c0 arch/x86/mm/fault.c:1397 handle_page_fault arch/x86/mm/fault.c:1485 [inline] exc_page_fault+0xa1/0x1e0 arch/x86/mm/fault.c:1541 asm_exc_page_fault+0x1e/0x30 RIP: 0033:0x7f1c76ae0f3a 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:00007ffd77519830 EFLAGS: 00010246 RAX: 000000002001d000 RBX: 00007f1c77057000 RCX: 0000000000000000 RDX: 7918fb2ab9430a09 RSI: 0000000000000001 RDI: 0000555556aca2f0 RBP: 00007ffd77519928 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000013050 R12: 0000000000000001 R13: 0000000000000000 R14: 00007f1c76c52f60 R15: 00000000000618db ---------------- Code disassembly (best guess): 0: 48 89 47 18 mov %rax,0x18(%rdi) 4: 48 89 47 20 mov %rax,0x20(%rdi) 8: 48 89 47 28 mov %rax,0x28(%rdi) c: 48 89 47 30 mov %rax,0x30(%rdi) 10: 48 89 47 38 mov %rax,0x38(%rdi) 14: 48 8d 7f 40 lea 0x40(%rdi),%rdi 18: 75 d9 jne 0xfffffff3 1a: 90 nop 1b: c3 retq 1c: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 23: b9 00 10 00 00 mov $0x1000,%ecx 28: 31 c0 xor %eax,%eax * 2a: f3 aa rep stos %al,%es:(%rdi) <-- trapping instruction 2c: c3 retq 2d: cc int3 2e: cc int3 2f: cc int3 30: cc int3 31: cc int3 32: cc int3 33: 55 push %rbp 34: 41 57 push %r15 36: 41 56 push %r14 38: 41 55 push %r13 3a: 41 54 push %r12 3c: 53 push %rbx 3d: 48 rex.W 3e: 83 .byte 0x83 3f: ec in (%dx),%al