============================================
WARNING: possible recursive locking detected
4.19.211-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.5/14273 is trying to acquire lock:
0000000019d43fc8 (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591
but task is already holding lock:
0000000019d43fc8 (&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
5 locks held by syz-executor.5/14273:
#0: 00000000433cd745 (sb_writers#3){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline]
#0: 00000000433cd745 (sb_writers#3){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360
#1: 0000000087d27e20 (&type->i_mutex_dir_key#3/1){+.+.}, at: inode_lock_nested include/linux/fs.h:783 [inline]
#1: 0000000087d27e20 (&type->i_mutex_dir_key#3/1){+.+.}, at: filename_create+0x15a/0x490 fs/namei.c:3638
#2: 00000000ed332cae (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline]
#2: 00000000ed332cae (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115
#3: 0000000019d43fc8 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876
#4: 000000003ecbeb21 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293
stack backtrace:
CPU: 1 PID: 14273 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:recently_deleted fs/ext4/ialloc.c:701 [inline]
RIP: 0010:find_inode_bit+0x2e1/0x520 fs/ext4/ialloc.c:724
Code: 03 5e 28 48 8d 7b 14 48 89 f8 48 c1 e8 03 0f b6 14 28 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e3 01 00 00 8b 5b 14 8a 33 78 ff 49 89 c7 4c 89 f0 48 c1 e8 03 80 3c 28 00 0f 85 ba
RSP: 0018:ffff888047727b28 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffd5
RAX: 0000000000000007 RBX: 000000006391343e RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81dc9283 RDI: ffff888043062514
RBP: dffffc0000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888235102bc0
R13: ffff888047727ce8 R14: ffff88804040c1f8 R15: 0000000000000005
__ext4_new_inode+0x160c/0x5a20 fs/ext4/ialloc.c:916
ext4_symlink+0x3f5/0xc00 fs/ext4/namei.c:3176
vfs_symlink+0x453/0x6c0 fs/namei.c:4129
do_symlinkat+0x258/0x2c0 fs/namei.c:4156
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7ff41d0f9a17
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 0a 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe8f903298 EFLAGS: 00000202 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff41d0f9a17
RDX: 00007ff41d155bab RSI: 00000000ffffff9c RDI: 00007ffe8f903360
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffe8f903130
R10: 00007ffe8f902fe7 R11: 0000000000000202 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffe8f903360
JFS: discard option not supported on device
jfs: Unrecognized mount option "gid=0x0000000000000000" or missing value
----------------
Code disassembly (best guess):
0: 03 5e 28 add 0x28(%rsi),%ebx
3: 48 8d 7b 14 lea 0x14(%rbx),%rdi
7: 48 89 f8 mov %rdi,%rax
a: 48 c1 e8 03 shr $0x3,%rax
e: 0f b6 14 28 movzbl (%rax,%rbp,1),%edx
12: 48 89 f8 mov %rdi,%rax
15: 83 e0 07 and $0x7,%eax
18: 83 c0 03 add $0x3,%eax
1b: 38 d0 cmp %dl,%al
1d: 7c 08 jl 0x27
1f: 84 d2 test %dl,%dl
21: 0f 85 e3 01 00 00 jne 0x20a
27: 8b 5b 14 mov 0x14(%rbx),%ebx
* 2a: e8 8a 33 78 ff callq 0xff7833b9 <-- trapping instruction
2f: 49 89 c7 mov %rax,%r15
32: 4c 89 f0 mov %r14,%rax
35: 48 c1 e8 03 shr $0x3,%rax
39: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1)
3d: 0f .byte 0xf
3e: 85 .byte 0x85
3f: ba .byte 0xba