============================================ WARNING: possible recursive locking detected 5.16.0-rc4-syzkaller #0 Not tainted -------------------------------------------- syz-executor.2/29666 is trying to acquire lock: ffffffff9078d3f0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:577 but task is already holding lock: ffffffff9078d3f0 (&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 syz-executor.2/29666: #0: ffffffff8d2f9110 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x2f5/0x760 net/core/net_namespace.c:466 #1: ffffffff8d30cc68 (rtnl_mutex){+.+.}-{3:3}, at: ip_tunnel_init_net+0x2d5/0x9d0 net/ipv4/ip_tunnel.c:1069 #2: ffff8880183649b0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #2: ffff8880183649b0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116 #3: ffffffff9078d3f0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 #4: ffff88801e18b098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 0 PID: 29666 Comm: syz-executor.2 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+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:ndisc_netdev_event+0x2/0x560 net/ipv6/ndisc.c:1792 Code: ff e8 02 8b d1 f9 e9 3a ff ff ff 48 8b 7c 24 10 e8 e3 8a d1 f9 e9 d6 fe ff ff 4c 89 f7 e8 e6 8a d1 f9 e9 33 fe ff ff 90 41 57 <41> 56 41 55 41 54 55 48 89 d5 53 48 89 f3 e8 5b c9 8a f9 48 89 ea RSP: 0018:ffffc90003797988 EFLAGS: 00000246 RAX: 1ffffffff1a9708c RBX: 00000000ffffffa7 RCX: ffffc9000dccb000 RDX: ffffc90003797a78 RSI: 0000000000000011 RDI: ffffffff8d4b8460 RBP: dffffc0000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff814e5e0b R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff8d4b2ec0 R14: 0000000000000000 R15: ffffffff8d4b8460 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2002 call_netdevice_notifiers_extack net/core/dev.c:2014 [inline] call_netdevice_notifiers net/core/dev.c:2028 [inline] register_netdevice+0xa58/0x1500 net/core/dev.c:10331 __ip_tunnel_create+0x398/0x5c0 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x2e4/0x9d0 net/ipv4/ip_tunnel.c:1070 ops_init+0xaf/0x470 net/core/net_namespace.c:140 setup_net+0x40f/0xa30 net/core/net_namespace.c:326 copy_net_ns+0x318/0x760 net/core/net_namespace.c:470 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:226 ksys_unshare+0x445/0x920 kernel/fork.c:3075 __do_sys_unshare kernel/fork.c:3146 [inline] __se_sys_unshare kernel/fork.c:3144 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3144 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:0x7fc38b787af9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fc38a6fd188 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 00007fc38b89af60 RCX: 00007fc38b787af9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000000 RBP: 00007fc38b7e1ff7 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe616c3d9f R14: 00007fc38a6fd300 R15: 0000000000022000 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e8 02 8b d1 f9 callq 0xf9d18b07 5: e9 3a ff ff ff jmpq 0xffffff44 a: 48 8b 7c 24 10 mov 0x10(%rsp),%rdi f: e8 e3 8a d1 f9 callq 0xf9d18af7 14: e9 d6 fe ff ff jmpq 0xfffffeef 19: 4c 89 f7 mov %r14,%rdi 1c: e8 e6 8a d1 f9 callq 0xf9d18b07 21: e9 33 fe ff ff jmpq 0xfffffe59 26: 90 nop 27: 41 57 push %r15 * 29: 41 56 push %r14 <-- trapping instruction 2b: 41 55 push %r13 2d: 41 54 push %r12 2f: 55 push %rbp 30: 48 89 d5 mov %rdx,%rbp 33: 53 push %rbx 34: 48 89 f3 mov %rsi,%rbx 37: e8 5b c9 8a f9 callq 0xf98ac997 3c: 48 89 ea mov %rbp,%rdx