============================================ WARNING: possible recursive locking detected 5.15.0-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/11964 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 3 locks held by syz-executor.1/11964: #0: ffff888021893bb0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #0: ffff888021893bb0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116 #1: ffffffff90552e30 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 #2: ffff888079964098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 1 PID: 11964 Comm: syz-executor.1 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+0x4d/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202 Code: 0f 1f 44 00 00 55 48 8b 74 24 08 48 89 fd 48 83 c7 18 e8 5e eb 21 f8 48 89 ef e8 a6 61 22 f8 e8 a1 0f 43 f8 fb bf 01 00 00 00 56 29 15 f8 65 8b 05 5f 7f c7 76 85 c0 74 02 5d c3 0f 1f 44 00 RSP: 0018:ffffc90000dc0e08 EFLAGS: 00000206 RAX: 0000000000002c3c RBX: ffffffff873c6200 RCX: 1ffffffff1ade3e1 RDX: 0000000000000000 RSI: 0000000000000101 RDI: 0000000000000001 RBP: ffff8880b9d28280 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff817e0068 R11: 0000000000000000 R12: ffffc90000dc0e98 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff8880b9d28280 expire_timers kernel/time/timer.c:1465 [inline] __run_timers.part.0+0x665/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:636 irq_exit_rcu+0x5/0x20 kernel/softirq.c:648 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x7/0x60 kernel/kcov.c:197 Code: fd ff ff b9 ff ff ff ff ba 08 00 00 00 4d 8b 03 48 0f bd ca 49 8b 45 00 48 63 c9 e9 64 ff ff ff 0f 1f 00 65 8b 05 69 aa 8a 7e <89> c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b 14 25 40 70 02 00 a9 RSP: 0018:ffffc90016e17960 EFLAGS: 00000246 RAX: 0000000080000000 RBX: 1ffff92002dc2f2d RCX: ffffc90016e17b18 RDX: 0000000000000000 RSI: 0000000020239268 RDI: ffffc90016e17d50 RBP: ffffc90016e17d50 R08: 0000000000000000 R09: 0000000000000080 R10: ffffffff8716cd6d R11: 0000000000000b03 R12: 0000000020239268 R13: 0000000000000000 R14: ffffc90016e17b18 R15: 0000000000000080 get_compat_msghdr+0x6f/0x120 net/compat.c:97 sendmsg_copy_msghdr+0x150/0x160 net/socket.c:2438 ___sys_sendmsg+0xc6/0x170 net/socket.c:2459 __sys_sendmmsg+0x297/0x470 net/socket.c:2542 __compat_sys_sendmmsg net/compat.c:361 [inline] __do_compat_sys_sendmmsg net/compat.c:368 [inline] __se_compat_sys_sendmmsg net/compat.c:365 [inline] __ia32_compat_sys_sendmmsg+0x9b/0x100 net/compat.c:365 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf6efc549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f44f65fc EFLAGS: 00000296 ORIG_RAX: 0000000000000159 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000020236fc8 RDX: 000000000000013c RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 5: 55 push %rbp 6: 48 8b 74 24 08 mov 0x8(%rsp),%rsi b: 48 89 fd mov %rdi,%rbp e: 48 83 c7 18 add $0x18,%rdi 12: e8 5e eb 21 f8 callq 0xf821eb75 17: 48 89 ef mov %rbp,%rdi 1a: e8 a6 61 22 f8 callq 0xf82261c5 1f: e8 a1 0f 43 f8 callq 0xf8430fc5 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 56 29 15 f8 callq 0xf8152985 <-- trapping instruction 2f: 65 8b 05 5f 7f c7 76 mov %gs:0x76c77f5f(%rip),%eax # 0x76c77f95 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5d pop %rbp 3b: c3 retq 3c: 0f .byte 0xf 3d: 1f (bad) 3e: 44 rex.R