============================================ WARNING: possible recursive locking detected 4.19.166-syzkaller #0 Not tainted -------------------------------------------- syz-executor.5/684 is trying to acquire lock: 00000000c8895500 (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 00000000c8895500 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1869 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/684: #0: 0000000009925d1a ((&dsp_spl_tl)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #0: 0000000009925d1a ((&dsp_spl_tl)){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 #1: 00000000743720d7 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #1: 00000000743720d7 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #2: 00000000c8895500 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1869 #3: 00000000693057b0 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 1 PID: 684 Comm: syz-executor.5 Not tainted 4.19.166-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+0x1fc/0x2fe lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1763 [inline] check_deadlock kernel/locking/lockdep.c:1807 [inline] validate_chain kernel/locking/lockdep.c:2403 [inline] __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __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:1806 serial8250_handle_irq.part.0+0x31f/0x3d0 drivers/tty/serial/8250/8250_port.c:1893 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1866 [inline] serial8250_default_handle_irq+0xae/0x220 drivers/tty/serial/8250/8250_port.c:1909 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/0x285 kernel/irq/handle.c:206 handle_edge_irq+0x260/0xcf0 kernel/irq/chip.c:797 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:dsp_cmx_send+0x0/0x1590 drivers/isdn/mISDN/dsp_cmx.c:1629 Code: 89 f5 ff ff be 04 00 00 00 e8 1c b7 a7 fb e9 40 f5 ff ff 48 8b 7c 24 10 e8 8d b2 a7 fb e9 bb f4 ff ff 0f 1f 84 00 00 00 00 00 <41> 57 41 56 41 55 41 54 55 53 48 83 ec 58 e8 3d 8a 71 fb 48 c7 c7 RSP: 0018:ffff8880ba107d10 EFLAGS: 00000206 ORIG_RAX: ffffffffffffffd4 RAX: ffffffff85f346c0 RBX: ffffffff8dd0d380 RCX: ffffffff8155bd83 RDX: 0000000000000100 RSI: ffffffff8155b95e RDI: ffffffff8dd0d380 RBP: 0000000000000101 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff8880ba107d48 R13: 1ffff11017420fa5 R14: 0000000000000000 R15: 0000000000000000 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x26c/0x9a0 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:545 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [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:184 Code: 48 c7 c0 88 81 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 2f 48 83 3d 7c 87 db 01 00 74 15 48 89 df 57 9d <0f> 1f 44 00 00 eb b2 e8 2a 49 ea f8 eb c0 0f 0b 0f 0b 48 c7 c7 88 RSP: 0018:ffff888052587540 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3031 RBX: 0000000000000286 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000286 RBP: ffffffff8d429c08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888032212000 R13: ffff888032212000 R14: 0000000000000000 R15: dffffc0000000000 __debug_check_no_obj_freed lib/debugobjects.c:798 [inline] debug_check_no_obj_freed+0x201/0x482 lib/debugobjects.c:817 free_pages_prepare mm/page_alloc.c:1056 [inline] free_pcp_prepare mm/page_alloc.c:1070 [inline] free_unref_page_prepare+0x1ea/0x5d0 mm/page_alloc.c:2763 free_unref_page_list+0xd8/0x7b0 mm/page_alloc.c:2832 release_pages+0xb0d/0x15a0 mm/swap.c:800 tlb_flush_mmu_free mm/memory.c:261 [inline] zap_pte_range mm/memory.c:1417 [inline] zap_pmd_range mm/memory.c:1452 [inline] zap_pud_range mm/memory.c:1481 [inline] zap_p4d_range mm/memory.c:1502 [inline] unmap_page_range+0x207f/0x2a70 mm/memory.c:1523 unmap_single_vma+0x198/0x300 mm/memory.c:1568 unmap_vmas+0xa9/0x180 mm/memory.c:1598 exit_mmap+0x2b9/0x530 mm/mmap.c:3093 __mmput kernel/fork.c:1015 [inline] mmput+0x14e/0x4a0 kernel/fork.c:1036 exit_mm kernel/exit.c:549 [inline] do_exit+0xaf0/0x2be0 kernel/exit.c:877 do_group_exit+0x125/0x310 kernel/exit.c:993 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45e219 Code: Bad RIP value. RSP: 002b:00007f6139152cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000119c030 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000119c030 RBP: 000000000119c028 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034 R13: 00007ffc28c0210f R14: 00007f61391539c0 R15: 000000000119c034