============================================ WARNING: possible recursive locking detected 5.15.0-rc7-syzkaller #0 Not tainted -------------------------------------------- syz-executor.2/27333 is trying to acquire lock: ffffffff90528ed0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x570 drivers/tty/serial/serial_core.c:570 but task is already holding lock: ffffffff90528ed0 (&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.2/27333: #0: ffff88807ad2dc30 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #0: ffff88807ad2dc30 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x3a/0x200 drivers/tty/serial/8250/8250_core.c:116 #1: ffffffff90528ed0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1908 #2: ffff88806e609098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 stack backtrace: CPU: 1 PID: 27333 Comm: syz-executor.2 Not tainted 5.15.0-rc7-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:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0x102/0x280 kernel/irq/handle.c:213 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+0x9f/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0010:memset include/linux/fortify-string.h:175 [inline] RIP: 0010:__hrtimer_init+0x41/0x280 kernel/time/hrtimer.c:1557 Code: 89 ed 53 83 e5 04 48 89 fb 48 83 ec 08 e8 37 89 10 00 89 ee 31 ff e8 de 91 10 00 85 ed ba 40 00 00 00 48 89 df 0f 95 44 24 07 <31> f6 e8 68 5f 57 00 65 4c 03 35 e0 fa 9b 7e 31 ff 44 89 e6 e8 b6 RSP: 0018:ffffc90006dbfd20 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffc90006dbfd98 RCX: 0000000000000000 RDX: 0000000000000040 RSI: ffff88801a8ce280 RDI: ffffc90006dbfd98 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 R10: ffffffff81659a72 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000001 R14: 00000000000223c0 R15: 0000000000000000 __hrtimer_init_sleeper kernel/time/hrtimer.c:1996 [inline] hrtimer_init_sleeper_on_stack kernel/time/hrtimer.c:446 [inline] hrtimer_nanosleep+0x181/0x4a0 kernel/time/hrtimer.c:2095 common_nsleep+0xa2/0xc0 kernel/time/posix-timers.c:1227 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1245 [inline] __x64_sys_clock_nanosleep+0x2f4/0x430 kernel/time/posix-timers.c:1245 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:0x7fd6fe7f4811 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 aa e7 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 e3 e7 ff ff 48 8b 04 24 eb 97 66 2e 0f 1f RSP: 002b:00007fff53ef7860 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00000000001d571f RCX: 00007fd6fe7f4811 RDX: 00007fff53ef78a0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000000000000 R09: 00007fff53fed080 R10: 0000000000000000 R11: 0000000000000293 R12: 00007fd6fe8e2f60 R13: 00007fd6fe8e3b60 R14: 00007fd6fe8e2f60 R15: 00000000001d53de ---------------- Code disassembly (best guess): 0: 89 ed mov %ebp,%ebp 2: 53 push %rbx 3: 83 e5 04 and $0x4,%ebp 6: 48 89 fb mov %rdi,%rbx 9: 48 83 ec 08 sub $0x8,%rsp d: e8 37 89 10 00 callq 0x108949 12: 89 ee mov %ebp,%esi 14: 31 ff xor %edi,%edi 16: e8 de 91 10 00 callq 0x1091f9 1b: 85 ed test %ebp,%ebp 1d: ba 40 00 00 00 mov $0x40,%edx 22: 48 89 df mov %rbx,%rdi 25: 0f 95 44 24 07 setne 0x7(%rsp) * 2a: 31 f6 xor %esi,%esi <-- trapping instruction 2c: e8 68 5f 57 00 callq 0x575f99 31: 65 4c 03 35 e0 fa 9b add %gs:0x7e9bfae0(%rip),%r14 # 0x7e9bfb19 38: 7e 39: 31 ff xor %edi,%edi 3b: 44 89 e6 mov %r12d,%esi 3e: e8 .byte 0xe8 3f: b6 .byte 0xb6