============================================
WARNING: possible recursive locking detected
5.15.0-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.5/10682 is trying to acquire lock:
ffffffff90575690 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:577
but task is already holding lock:
ffffffff90575690 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 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.5/10682:
#0: ffff88807844b978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#0: ffff88807844b978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1323 [inline]
#0: ffff88807844b978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1467 [inline]
#0: ffff88807844b978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1496 [inline]
#0: ffff88807844b978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1517 [inline]
#0: ffff88807844b978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0x86b/0x29f0 mm/memory.c:1538
#1: ffff888072411eb0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#1: ffff888072411eb0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116
#2: ffffffff90575690 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908
#3: ffff888039370098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273
stack backtrace:
CPU: 0 PID: 10682 Comm: syz-executor.5 Not tainted 5.15.0-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+0xcd/0x134 lib/dump_stack.c:106
print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
check_deadlock kernel/locking/lockdep.c:2999 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027
lock_acquire kernel/locking/lockdep.c:5637 [inline]
lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:577
n_hdlc_send_frames+0x24b/0x490 drivers/tty/n_hdlc.c:290
tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:534
tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:51
serial8250_tx_chars+0x4f3/0xad0 drivers/tty/serial/8250/8250_port.c:1845
serial8250_handle_irq.part.0+0x328/0x3d0 drivers/tty/serial/8250/8250_port.c:1932
serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1905 [inline]
serial8250_default_handle_irq+0xb2/0x220 drivers/tty/serial/8250/8250_port.c:1949
serial8250_interrupt+0xfd/0x200 drivers/tty/serial/8250/8250_core.c:126
__handle_irq_event_percpu+0x303/0x8f0 kernel/irq/handle.c:158
handle_irq_event_percpu kernel/irq/handle.c:198 [inline]
handle_irq_event+0x102/0x280 kernel/irq/handle.c:215
handle_edge_irq+0x25f/0xd00 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+0x9d/0x210 arch/x86/kernel/irq.c:250
common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240
asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629
RIP: 0010:_compound_head include/linux/page-flags.h:200 [inline]
RIP: 0010:PageSwapBacked include/linux/page-flags.h:446 [inline]
RIP: 0010:mm_counter_file include/linux/mm.h:2068 [inline]
RIP: 0010:mm_counter include/linux/mm.h:2077 [inline]
RIP: 0010:zap_pte_range mm/memory.c:1356 [inline]
RIP: 0010:zap_pmd_range mm/memory.c:1467 [inline]
RIP: 0010:zap_pud_range mm/memory.c:1496 [inline]
RIP: 0010:zap_p4d_range mm/memory.c:1517 [inline]
RIP: 0010:unmap_page_range+0xe5a/0x29f0 mm/memory.c:1538
Code: 85 3e 1a 00 00 48 8b 1b 48 c7 c7 ff ff ff ff 48 89 de e8 c9 25 cb ff 48 83 fb ff 0f 84 50 12 00 00 e8 2a 23 cb ff 48 8b 45 08 <31> ff 48 89 c3 48 89 44 24 18 83 e3 01 48 89 de e8 a1 25 cb ff 48
RSP: 0018:ffffc9000628f7a8 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 00fff00000000000 RCX: 0000000000000000
RDX: ffff8880185f8000 RSI: ffffffff81aca346 RDI: 0000000000000003
RBP: ffffea0001ef2ec0 R08: ffffffffffffffff R09: 0000000000000000
R10: ffffffff81aca337 R11: 0000000000000000 R12: ffffea0001ef2ec8
R13: ffff888040033420 R14: dffffc0000000000 R15: 00007f4762885000
unmap_single_vma+0x198/0x310 mm/memory.c:1583
unmap_vmas+0x16b/0x2f0 mm/memory.c:1615
exit_mmap+0x1d0/0x630 mm/mmap.c:3170
__mmput+0x122/0x4b0 kernel/fork.c:1113
mmput+0x56/0x60 kernel/fork.c:1134
exit_mm kernel/exit.c:507 [inline]
do_exit+0xb27/0x2b40 kernel/exit.c:819
do_group_exit+0x125/0x310 kernel/exit.c:929
get_signal+0x47d/0x2220 kernel/signal.c:2830
arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f476419bae9
Code: Unable to access opcode bytes at RIP 0x7f476419babf.
RSP: 002b:00007f4761711218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f47642aef68 RCX: 00007f476419bae9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f47642aef68
RBP: 00007f47642aef60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f47642aef6c
R13: 00007ffef28968ef R14: 00007f4761711300 R15: 0000000000022000
----------------
Code disassembly (best guess), 3 bytes skipped:
0: 00 00 add %al,(%rax)
2: 48 8b 1b mov (%rbx),%rbx
5: 48 c7 c7 ff ff ff ff mov $0xffffffffffffffff,%rdi
c: 48 89 de mov %rbx,%rsi
f: e8 c9 25 cb ff callq 0xffcb25dd
14: 48 83 fb ff cmp $0xffffffffffffffff,%rbx
18: 0f 84 50 12 00 00 je 0x126e
1e: e8 2a 23 cb ff callq 0xffcb234d
23: 48 8b 45 08 mov 0x8(%rbp),%rax
* 27: 31 ff xor %edi,%edi <-- trapping instruction
29: 48 89 c3 mov %rax,%rbx
2c: 48 89 44 24 18 mov %rax,0x18(%rsp)
31: 83 e3 01 and $0x1,%ebx
34: 48 89 de mov %rbx,%rsi
37: e8 a1 25 cb ff callq 0xffcb25dd
3c: 48 rex.W