============================================
WARNING: possible recursive locking detected
5.15.0-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.3/15825 is trying to acquire lock:
ffffffff90552e30 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:570
but task is already holding lock:
ffffffff90552e30 (&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
6 locks held by syz-executor.3/15825:
#0: ffff88807ecc0460 (sb_writers#5){.+.+}-{0:0}, at: filename_create+0xf3/0x480 fs/namei.c:3649
#1: ffff888083f5a1d8 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:818 [inline]
#1: ffff888083f5a1d8 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: filename_create+0x158/0x480 fs/namei.c:3654
#2: ffffffff8b9838e0 (rcu_read_lock){....}-{1:2}, at: ext4_inode_block_valid+0x1da/0x620 fs/ext4/block_validity.c:310
#3: ffff8880782614b0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
#3: ffff8880782614b0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116
#4: ffffffff90552e30 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908
#5: ffff88801954f098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273
stack backtrace:
CPU: 0 PID: 15825 Comm: syz-executor.3 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:2944 [inline]
check_deadlock kernel/locking/lockdep.c:2987 [inline]
validate_chain kernel/locking/lockdep.c:3776 [inline]
__lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5015
lock_acquire kernel/locking/lockdep.c:5625 [inline]
lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590
__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:570
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:check_preemption_disabled+0x3f/0x170 lib/smp_processor_id.c:56
Code: 8b 25 4d f5 c9 76 65 8b 1d be 4f ca 76 81 e3 ff ff ff 7f 31 ff 89 de 0f 1f 44 00 00 85 db 74 11 0f 1f 44 00 00 44 89 e0 5b 5d <41> 5c 41 5d 41 5e c3 0f 1f 44 00 00 9c 5b 81 e3 00 02 00 00 31 ff
RSP: 0018:ffffc9000463f878 EFLAGS: 00000202
RAX: 0000000000000000 RBX: 00000000000026be RCX: 0000000000000000
RDX: ffff8880208b5700 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 00000000000026be R08: 0000000000002022 R09: 0000000000000001
R10: ffffffff8209c050 R11: 0000000000000000 R12: 0000000000000000
R13: ffffffff89e47ce0 R14: 0000000000002022 R15: 0000000000000001
rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:330 [inline]
rcu_is_watching+0xe/0xb0 kernel/rcu/tree.c:1121
rcu_read_unlock include/linux/rcupdate.h:717 [inline]
ext4_inode_block_valid+0x398/0x620 fs/ext4/block_validity.c:337
__check_block_validity.constprop.0+0x193/0x2f0 fs/ext4/inode.c:408
ext4_map_blocks+0x1014/0x17d0 fs/ext4/inode.c:593
ext4_getblk+0x553/0x6b0 fs/ext4/inode.c:847
ext4_bread+0x2a/0x1c0 fs/ext4/inode.c:900
__ext4_read_dirblock+0x34/0xe00 fs/ext4/namei.c:116
ext4_add_entry+0x847/0x1080 fs/ext4/namei.c:2350
ext4_add_nondir+0x90/0x290 fs/ext4/namei.c:2709
ext4_symlink+0x873/0xd40 fs/ext4/namei.c:3363
vfs_symlink fs/namei.c:4248 [inline]
vfs_symlink+0x479/0x730 fs/namei.c:4233
do_symlinkat+0x261/0x2e0 fs/namei.c:4277
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x75/0x90 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa6ed56b3f7
Code: 73 01 c3 48 c7 c1 bc 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 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd676a2138 EFLAGS: 00000202 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa6ed56b3f7
RDX: 00007ffd676a2217 RSI: 00007fa6ed5c5fd1 RDI: 00007ffd676a2200
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffd676a1fd0
R10: 00007ffd676a1e87 R11: 0000000000000202 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffd676a2200
----------------
Code disassembly (best guess):
0: 8b 25 4d f5 c9 76 mov 0x76c9f54d(%rip),%esp # 0x76c9f553
6: 65 8b 1d be 4f ca 76 mov %gs:0x76ca4fbe(%rip),%ebx # 0x76ca4fcb
d: 81 e3 ff ff ff 7f and $0x7fffffff,%ebx
13: 31 ff xor %edi,%edi
15: 89 de mov %ebx,%esi
17: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
1c: 85 db test %ebx,%ebx
1e: 74 11 je 0x31
20: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
25: 44 89 e0 mov %r12d,%eax
28: 5b pop %rbx
29: 5d pop %rbp
* 2a: 41 5c pop %r12 <-- trapping instruction
2c: 41 5d pop %r13
2e: 41 5e pop %r14
30: c3 retq
31: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
36: 9c pushfq
37: 5b pop %rbx
38: 81 e3 00 02 00 00 and $0x200,%ebx
3e: 31 ff xor %edi,%edi