============================================ WARNING: possible recursive locking detected 5.15.0-syzkaller #0 Not tainted -------------------------------------------- systemd-udevd/2937 is trying to acquire lock: ffffffff9055f5d0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:577 but task is already holding lock: ffffffff9055f5d0 (&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 systemd-udevd/2937: #0: ffffffff8b983a20 (rcu_read_lock){....}-{1:2}, at: path_init+0x699/0x1920 fs/namei.c:2329 #1: ffff88807181abb0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #1: ffff88807181abb0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116 #2: ffffffff9055f5d0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 #3: ffff88803d8bc098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 0 PID: 2937 Comm: systemd-udevd 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:2959 [inline] check_deadlock kernel/locking/lockdep.c:3002 [inline] validate_chain kernel/locking/lockdep.c:3791 [inline] __lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5030 lock_acquire kernel/locking/lockdep.c:5640 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605 __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:write_comp_data kernel/kcov.c:218 [inline] RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x17/0x70 kernel/kcov.c:284 Code: 30 f0 4c 89 54 d8 20 48 89 10 5b c3 0f 1f 80 00 00 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 89 f1 65 48 8b 34 25 40 70 02 00 54 ef ff ff 84 c0 74 4b 48 8b 86 88 15 00 00 8b b6 84 15 00 00 RSP: 0018:ffffc90001a4f828 EFLAGS: 00000206 RAX: 0000000000200000 RBX: ffffc90001a4fb80 RCX: 0000000000200000 RDX: 1ffff11002dfd1a7 RSI: ffff88807a805700 RDI: 0000000000000003 RBP: ffffc90001a4f928 R08: 0000000000600000 R09: 0000000000000001 R10: ffffffff81ccd4b1 R11: 0000000000000000 R12: ffff888016fe8d38 R13: ffff8880110c6d90 R14: 0000000000000040 R15: 0000000000000050 step_into+0x1a1/0x1c80 fs/namei.c:1804 walk_component+0x171/0x6a0 fs/namei.c:1976 link_path_walk.part.0+0x757/0xd00 fs/namei.c:2297 link_path_walk fs/namei.c:2221 [inline] path_lookupat+0xc8/0x860 fs/namei.c:2448 filename_lookup+0x1c6/0x590 fs/namei.c:2478 user_path_at_empty+0x42/0x60 fs/namei.c:2801 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x142/0x390 fs/stat.c:221 vfs_fstatat fs/stat.c:243 [inline] vfs_lstat include/linux/fs.h:3357 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:398 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:0x7f2104272335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RSP: 002b:00007ffecf113e98 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 0000558e9ff58990 RCX: 00007f2104272335 RDX: 00007ffecf113ed0 RSI: 00007ffecf113ed0 RDI: 0000558e9ff57990 RBP: 00007ffecf113f90 R08: 0000000000000003 R09: 0000000000001010 R10: 0000000000000210 R11: 0000000000000246 R12: 0000558e9ff57990 R13: 0000558e9ff579b6 R14: 0000558e9fbf6bf1 R15: 0000558e9fbf6bf6 ---------------- Code disassembly (best guess): 0: 30 f0 xor %dh,%al 2: 4c 89 54 d8 20 mov %r10,0x20(%rax,%rbx,8) 7: 48 89 10 mov %rdx,(%rax) a: 5b pop %rbx b: c3 retq c: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 13: 41 89 f8 mov %edi,%r8d 16: bf 03 00 00 00 mov $0x3,%edi 1b: 4c 8b 14 24 mov (%rsp),%r10 1f: 89 f1 mov %esi,%ecx 21: 65 48 8b 34 25 40 70 mov %gs:0x27040,%rsi 28: 02 00 * 2a: e8 54 ef ff ff callq 0xffffef83 <-- trapping instruction 2f: 84 c0 test %al,%al 31: 74 4b je 0x7e 33: 48 8b 86 88 15 00 00 mov 0x1588(%rsi),%rax 3a: 8b b6 84 15 00 00 mov 0x1584(%rsi),%esi