============================================ WARNING: possible recursive locking detected 5.16.0-rc1-syzkaller #0 Not tainted -------------------------------------------- systemd-udevd/20441 is trying to acquire lock: ffffffff9078b430 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:577 but task is already holding lock: ffffffff9078b430 (&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 5 locks held by systemd-udevd/20441: #0: ffffffff8bb83b60 (rcu_read_lock){....}-{1:2}, at: netlink_lookup+0x0/0x470 include/linux/rhashtable.h:614 #1: ffffffff8bb83b60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:689 [inline] #1: ffffffff8bb83b60 (rcu_read_lock){....}-{1:2}, at: netlink_lookup+0xb8/0x470 net/netlink/af_netlink.c:533 #2: ffff88809465e830 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] ffff88809465e830 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116 #3: ffffffff9078b430 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 #4: ffff88808023b098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 0 PID: 20441 Comm: systemd-udevd Not tainted 5.16.0-rc1-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:__rhashtable_lookup.constprop.0+0x2f/0x5e0 include/linux/rhashtable.h:594 Code: 55 41 54 49 89 fc 55 53 48 83 ec 60 48 89 34 24 e8 a6 ab 11 fa 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 <0f> 85 6f 05 00 00 49 8b 04 24 4c 89 e7 49 89 c7 e8 ec 37 74 fc 31 RSP: 0018:ffffc90012fc7838 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: ffff8880157a98d8 RCX: 0000000000000000 RDX: 1ffff11002af531b RSI: ffffffff8765edba RDI: ffff8880157a98d8 RBP: 1ffff920025f8f1a R08: 0000000000000000 R09: 0000000000000001 R10: ffffffff8765f496 R11: 0000000000000000 R12: ffff8880157a98d8 R13: ffffffff8d2f8e80 R14: ffffc90012fc78f0 R15: 0000000000000002 rhashtable_lookup include/linux/rhashtable.h:638 [inline] rhashtable_lookup_fast include/linux/rhashtable.h:664 [inline] __netlink_lookup net/netlink/af_netlink.c:514 [inline] netlink_lookup+0x130/0x470 net/netlink/af_netlink.c:534 netlink_getsockbyportid net/netlink/af_netlink.c:1154 [inline] netlink_unicast+0x244/0x7d0 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x86d/0xda0 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 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:0x7f3ca5305e67 Code: 89 02 48 c7 c0 ff ff ff ff eb d0 0f 1f 84 00 00 00 00 00 8b 05 6a b5 20 00 85 c0 75 2e 48 63 ff 48 63 d2 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 11 71 20 00 f7 d8 64 89 02 48 RSP: 002b:00007fffb6002728 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000008010 RCX: 00007f3ca5305e67 RDX: 0000000000000000 RSI: 00007fffb6002740 RDI: 000000000000000e RBP: 00007fffb6002740 R08: 0000558b02a3a424 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000000000fb R14: 0000558b02a48f50 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 55 push %rbp 1: 41 54 push %r12 3: 49 89 fc mov %rdi,%r12 6: 55 push %rbp 7: 53 push %rbx 8: 48 83 ec 60 sub $0x60,%rsp c: 48 89 34 24 mov %rsi,(%rsp) 10: e8 a6 ab 11 fa callq 0xfa11abbb 15: 4c 89 e2 mov %r12,%rdx 18: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1f: fc ff df 22: 48 c1 ea 03 shr $0x3,%rdx 26: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) * 2a: 0f 85 6f 05 00 00 jne 0x59f <-- trapping instruction 30: 49 8b 04 24 mov (%r12),%rax 34: 4c 89 e7 mov %r12,%rdi 37: 49 89 c7 mov %rax,%r15 3a: e8 ec 37 74 fc callq 0xfc74382b 3f: 31 .byte 0x31