============================================
WARNING: possible recursive locking detected
5.16.0-rc4-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.4/22173 is trying to acquire lock:
ffffffff90f563f0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0xfe/0x920 drivers/tty/serial/serial_core.c:577
but task is already holding lock:
ffffffff90f563f0 (&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
5 locks held by syz-executor.4/22173:
#0: ffff8880229dd3d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#0: ffff8880229dd3d8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range+0x28d/0x1ba0 mm/memory.c:1323
#1: ffffffff8cb1dd00 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
#2: ffff888078468fb0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#2: ffff888078468fb0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x39/0x1e0 drivers/tty/serial/8250/8250_core.c:116
#3: ffffffff90f563f0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq+0x3f/0x3e0 drivers/tty/serial/8250/8250_port.c:1908
#4: ffff8880796b2098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x18/0x80 drivers/tty/tty_ldisc.c:273
stack backtrace:
CPU: 1 PID: 22173 Comm: syz-executor.4 Not tainted 5.16.0-rc4-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:lockdep_enabled kernel/locking/lockdep.c:91 [inline]
RIP: 0010:lock_release+0xd5/0x810 kernel/locking/lockdep.c:5650
Code: 9c 7e 85 c0 0f 85 d4 04 00 00 65 48 8b 04 25 c0 6f 02 00 48 89 44 24 10 48 8d 98 5c 0a 00 00 48 89 d8 48 c1 e8 03 42 8a 04 20 <84> c0 0f 85 55 05 00 00 83 3b 00 0f 85 a3 04 00 00 4c 89 74 24 58
RSP: 0018:ffffc900058af2a0 EFLAGS: 00000a07
RAX: 1ffff11003a98c00 RBX: ffff88801d4c615c RCX: 0000000080000002
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffffc900058af3d0 R08: dffffc0000000000 R09: fffffbfff1bfd27e
R10: fffffbfff1bfd27e R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffff92000b15e60 R14: ffffffff81d60de0 R15: 00fff0000000000a
zap_pte_range+0xa25/0x1ba0 mm/memory.c:1357
zap_pmd_range mm/memory.c:1467 [inline]
zap_pud_range mm/memory.c:1496 [inline]
zap_p4d_range mm/memory.c:1517 [inline]
unmap_page_range+0x745/0xa20 mm/memory.c:1538
unmap_vmas+0x202/0x390 mm/memory.c:1615
exit_mmap+0x3c6/0x6f0 mm/mmap.c:3170
__mmput+0x111/0x3a0 kernel/fork.c:1113
exit_mm+0x211/0x2f0 kernel/exit.c:507
do_exit+0x688/0x24f0 kernel/exit.c:819
do_group_exit+0x168/0x2d0 kernel/exit.c:929
get_signal+0x1740/0x2120 kernel/signal.c:2852
arch_do_signal_or_restart+0x9c/0x730 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+0x191/0x220 kernel/entry/common.c:207
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:300
do_syscall_64+0x53/0xd0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f02e863ee99
Code: Unable to access opcode bytes at RIP 0x7f02e863ee6f.
RSP: 002b:00007f02e6fb4218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f02e8751f68 RCX: 00007f02e863ee99
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f02e8751f68
RBP: 00007f02e8751f60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f02e8751f6c
R13: 00007ffde84974ff R14: 00007f02e6fb4300 R15: 0000000000022000
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 85 c0 test %eax,%eax
2: 0f 85 d4 04 00 00 jne 0x4dc
8: 65 48 8b 04 25 c0 6f mov %gs:0x26fc0,%rax
f: 02 00
11: 48 89 44 24 10 mov %rax,0x10(%rsp)
16: 48 8d 98 5c 0a 00 00 lea 0xa5c(%rax),%rbx
1d: 48 89 d8 mov %rbx,%rax
20: 48 c1 e8 03 shr $0x3,%rax
24: 42 8a 04 20 mov (%rax,%r12,1),%al
* 28: 84 c0 test %al,%al <-- trapping instruction
2a: 0f 85 55 05 00 00 jne 0x585
30: 83 3b 00 cmpl $0x0,(%rbx)
33: 0f 85 a3 04 00 00 jne 0x4dc
39: 4c 89 74 24 58 mov %r14,0x58(%rsp)