============================================ WARNING: possible recursive locking detected 5.9.0-rc8-syzkaller #0 Not tainted -------------------------------------------- systemd-udevd/3924 is trying to acquire lock: ffffffff8df4b2f0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x12c/0x56a drivers/tty/serial/serial_core.c:594 but task is already holding lock: ffffffff8df4b2f0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1895 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/3924: #0: ffffffff8a68cb40 (tomoyo_ss){....}-{0:0}, at: tomoyo_path_perm+0x1c1/0x400 security/tomoyo/file.c:847 #1: ffff88808ef48db0 (&i->lock){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #1: ffff88808ef48db0 (&i->lock){-.-.}-{2:2}, at: serial8250_interrupt+0x27/0x190 drivers/tty/serial/8250/8250_core.c:116 #2: ffffffff8df4b2f0 (&port_lock_key){-.-.}-{2:2}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1895 #3: ffff88809d9e7098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:288 stack backtrace: CPU: 1 PID: 3924 Comm: systemd-udevd Not tainted 5.9.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x198/0x1fd lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2391 [inline] check_deadlock kernel/locking/lockdep.c:2432 [inline] validate_chain kernel/locking/lockdep.c:3202 [inline] __lock_acquire.cold+0x148/0x3b0 kernel/locking/lockdep.c:4441 lock_acquire+0x1f3/0xaf0 kernel/locking/lockdep.c:5029 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x94/0xce kernel/locking/spinlock.c:159 uart_write+0x12c/0x56a drivers/tty/serial/serial_core.c:594 n_hdlc_send_frames+0x22d/0x3d0 drivers/tty/n_hdlc.c:289 tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:536 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 serial8250_tx_chars+0x487/0xa80 drivers/tty/serial/8250/8250_port.c:1832 serial8250_handle_irq.part.0+0x328/0x3d0 drivers/tty/serial/8250/8250_port.c:1919 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1892 [inline] serial8250_default_handle_irq+0xb2/0x220 drivers/tty/serial/8250/8250_port.c:1935 serial8250_interrupt+0xe6/0x190 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x223/0xaa0 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0x102/0x285 kernel/irq/handle.c:213 handle_edge_irq+0x25f/0xd00 kernel/irq/chip.c:819 asm_call_irq_on_stack+0xf/0x20 __run_irq_on_irqstack arch/x86/include/asm/irq_stack.h:48 [inline] run_irq_on_irqstack_cond arch/x86/include/asm/irq_stack.h:101 [inline] handle_irq arch/x86/kernel/irq.c:230 [inline] __common_interrupt arch/x86/kernel/irq.c:249 [inline] common_interrupt+0x115/0x1f0 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:572 RIP: 0010:tomoyo_domain_quota_is_ok+0x11a/0x550 security/tomoyo/util.c:1032 Code: df eb 5f e8 58 27 ec fd 48 89 e8 48 89 ee 48 c1 e8 03 83 e6 07 42 0f b6 0c 30 48 8d 45 07 48 89 c2 48 c1 ea 03 42 0f b6 14 32 <40> 38 f1 40 0f 9e c6 84 c9 0f 95 c1 40 84 ce 0f 85 82 03 00 00 83 RSP: 0018:ffffc90000ef7900 EFLAGS: 00000a07 RAX: ffff888098cbd507 RBX: 0000000000000010 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffff888098cbd500 R08: 0000000000000001 R09: ffffffff8d5faa07 R10: 0000000000000010 R11: 0000000000000000 R12: 0000000000000020 R13: 000000000000012a R14: dffffc0000000000 R15: 0000000000000000 tomoyo_supervisor+0x2f2/0xef0 security/tomoyo/common.c:2089 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x270/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1278 vfs_getattr fs/stat.c:121 [inline] vfs_statx_fd+0x70/0xf0 fs/stat.c:151 vfs_fstat include/linux/fs.h:3189 [inline] __do_sys_newfstat+0x88/0x100 fs/stat.c:398 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7efd14ab72e2 Code: 48 8b 05 b9 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 77 33 48 63 fe b8 05 00 00 00 48 89 d6 0f 05 <48> 3d 00 f0 ff ff 77 06 f3 c3 0f 1f 40 00 48 8b 15 81 db 2b 00 f7 RSP: 002b:00007ffdf7350978 EFLAGS: 00000246 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007efd14ab72e2 RDX: 00007ffdf7350990 RSI: 00007ffdf7350990 RDI: 000000000000000e RBP: 00007ffdf7350b30 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000080000 R11: 0000000000000246 R12: 00005630c6c786f0 R13: 00005630c6c67010 R14: 00005630c6c78410 R15: 00007ffdf7350af0