EXT4-fs (loop5): orphan cleanup on readonly fs ============================================ EXT4-fs error (device loop5): ext4_quota_enable:5737: inode #3: comm syz-executor.5: iget: bad extra_isize 1 (inode size 256) WARNING: possible recursive locking detected 4.14.287-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/12106 is trying to acquire lock: (&port_lock_key){-.-.}, at: [] uart_write+0x109/0x560 drivers/tty/serial/serial_core.c:611 but task is already holding lock: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.0+0x20/0x330 drivers/tty/serial/8250/8250_port.c:1891 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&port_lock_key); lock(&port_lock_key); EXT4-fs (loop5): Remounting filesystem read-only *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor.1/12106: #0: (&mm->mmap_sem){++++}, at: [] __might_fault+0xd4/0x1b0 mm/memory.c:4699 #1: (&(&i->lock)->rlock){-.-.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] #1: (&(&i->lock)->rlock){-.-.}, at: [] serial8250_interrupt+0x3a/0x210 drivers/tty/serial/8250/8250_core.c:119 #2: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.0+0x20/0x330 drivers/tty/serial/8250/8250_port.c:1891 #3: EXT4-fs error (device loop5): ext4_quota_enable:5739: comm syz-executor.5: Bad quota inode # 3 (&tty->ldisc_sem){++++}, at: [] tty_ldisc_ref+0x1b/0x80 drivers/tty/tty_ldisc.c:305 stack backtrace: CPU: 1 PID: 12106 Comm: syz-executor.1 Not tainted 4.14.287-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_deadlock_bug kernel/locking/lockdep.c:1800 [inline] check_deadlock kernel/locking/lockdep.c:1847 [inline] validate_chain kernel/locking/lockdep.c:2448 [inline] __lock_acquire.cold+0x180/0x97c kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 EXT4-fs warning (device loop5): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-117). Please run e2fsck to fix. __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:160 EXT4-fs (loop5): Cannot turn on quotas: error -117 uart_write+0x109/0x560 drivers/tty/serial/serial_core.c:611 EXT4-fs (loop5): mounted filesystem without journal. Opts: errors=remount-ro, n_hdlc_send_frames+0x241/0x410 drivers/tty/n_hdlc.c:404 n_hdlc_tty_wakeup+0x95/0xb0 drivers/tty/n_hdlc.c:480 tty_wakeup+0xc3/0xf0 drivers/tty/tty_io.c:533 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:49 serial8250_tx_chars+0x3fe/0xc70 drivers/tty/serial/8250/8250_port.c:1828 serial8250_handle_irq.part.0+0x28d/0x330 drivers/tty/serial/8250/8250_port.c:1915 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1888 [inline] serial8250_default_handle_irq+0x8a/0x1f0 drivers/tty/serial/8250/8250_port.c:1931 serial8250_interrupt+0xf3/0x210 drivers/tty/serial/8250/8250_core.c:129 __handle_irq_event_percpu+0xee/0x7f0 kernel/irq/handle.c:147 handle_irq_event_percpu kernel/irq/handle.c:187 [inline] handle_irq_event+0xed/0x240 kernel/irq/handle.c:204 handle_edge_irq+0x224/0xc40 kernel/irq/chip.c:770 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1d0 arch/x86/kernel/irq.c:230 common_interrupt+0x93/0x93 arch/x86/entry/entry_64.S:576 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:lock_acquire+0x1ec/0x3f0 kernel/locking/lockdep.c:4001 RSP: 0018:ffff88806459f970 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffc8 RAX: 1ffffffff11e1341 RBX: ffff8880a257a2c0 RCX: 000000000000415f RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000286 RBP: ffff8880a3712150 R08: ffffffff8b9c15f8 R09: 0000000000050406 R10: ffff8880a257ab48 R11: ffff8880a257a2c0 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001 __might_fault mm/memory.c:4700 [inline] __might_fault+0x137/0x1b0 mm/memory.c:4685 _copy_from_user+0x27/0x100 lib/usercopy.c:10 copy_from_user include/linux/uaccess.h:147 [inline] copy_msghdr_from_user+0x7b/0x3b0 net/socket.c:1943 ___sys_recvmsg+0xe5/0x4d0 net/socket.c:2209 __sys_recvmmsg+0x1f3/0x5d0 net/socket.c:2329 SYSC_recvmmsg net/socket.c:2405 [inline] SyS_recvmmsg+0x125/0x140 net/socket.c:2394 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f1221a42109 RSP: 002b:00007f1220396168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f1221b55030 RCX: 00007f1221a42109 RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f1221a9c05d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc35daf4af R14: 00007f1220396300 R15: 0000000000022000