R13: 00007ffef56fe70f R14: 00007f897e23e300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 ====================================================== WARNING: possible circular locking dependency detected 5.17.0-rc8-next-20220316 #1 Not tainted ------------------------------------------------------ syz-executor.6/5269 is trying to acquire lock: ffffffff85115100 (console_owner){..-.}-{0:0}, at: console_unlock+0x34e/0xd40 but task is already holding lock: ffff888041c8a158 (&port->lock){-.-.}-{2:2}, at: pty_write+0xea/0x1e0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&port->lock){-.-.}-{2:2}: _raw_spin_lock_irqsave+0x39/0x50 tty_port_tty_get+0x1f/0x100 tty_port_default_wakeup+0x11/0x40 serial8250_tx_chars+0x50b/0xb00 serial8250_handle_irq.part.0+0x3f1/0x4c0 serial8250_default_handle_irq+0xb8/0x230 serial8250_interrupt+0xf4/0x1a0 __handle_irq_event_percpu+0x20f/0x820 handle_irq_event+0xa7/0x1e0 handle_edge_irq+0x262/0xd10 __common_interrupt+0x92/0x1d0 common_interrupt+0x9f/0xc0 asm_common_interrupt+0x1e/0x40 _raw_spin_unlock_irqrestore+0x2e/0x50 uart_write+0x304/0x580 do_output_char+0x5e4/0x860 n_tty_write+0x4c9/0xfe0 file_tty_write.constprop.0+0x529/0x910 redirected_tty_write+0xa1/0xc0 do_iter_readv_writev+0x481/0x760 do_iter_write+0x18d/0x700 vfs_writev+0x1aa/0x630 do_writev+0x139/0x300 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #1 (&port_lock_key){-.-.}-{2:2}: _raw_spin_lock_irqsave+0x39/0x50 serial8250_console_write+0x90e/0xb20 console_unlock+0x8c7/0xd40 register_console+0x378/0x7d0 univ8250_console_init+0x3a/0x46 console_init+0x3c1/0x58d start_kernel+0x301/0x4aa secondary_startup_64_no_verify+0xd5/0xdb -> #0 (console_owner){..-.}-{0:0}: __lock_acquire+0x2c2f/0x6120 lock_acquire+0x1a2/0x4d0 console_unlock+0x3a1/0xd40 vprintk_emit+0x1b4/0x550 vprintk+0x80/0x90 _printk+0xba/0xed should_fail+0x472/0x5a0 should_failslab+0x5/0x10 __kmalloc+0x72/0x440 tty_buffer_alloc+0x23f/0x2a0 __tty_buffer_request_room+0x156/0x2a0 tty_insert_flip_string_fixed_flag+0x91/0x240 pty_write+0x11c/0x1e0 n_tty_write+0x416/0xfe0 file_tty_write.constprop.0+0x529/0x910 new_sync_write+0x437/0x660 vfs_write+0x7c2/0xad0 ksys_write+0x12d/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: console_owner --> &port_lock_key --> &port->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&port->lock); lock(&port_lock_key); lock(&port->lock); lock(console_owner); *** DEADLOCK *** 6 locks held by syz-executor.6/5269: #0: ffff88800e501098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 #1: ffff88800e501130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x29f/0x910 #2: ffff88800e5012e8 (&o_tty->termios_rwsem/1){++++}-{3:3}, at: n_tty_write+0x1bf/0xfe0 #3: ffffc90002cad378 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x542/0xfe0 #4: ffff888041c8a158 (&port->lock){-.-.}-{2:2}, at: pty_write+0xea/0x1e0 #5: ffffffff851f5540 (console_lock){+.+.}-{0:0}, at: vprintk+0x80/0x90 stack backtrace: CPU: 0 PID: 5269 Comm: syz-executor.6 Not tainted 5.17.0-rc8-next-20220316 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 check_noncircular+0x25f/0x2e0 __lock_acquire+0x2c2f/0x6120 lock_acquire+0x1a2/0x4d0 console_unlock+0x3a1/0xd40 vprintk_emit+0x1b4/0x550 vprintk+0x80/0x90 _printk+0xba/0xed should_fail+0x472/0x5a0 should_failslab+0x5/0x10 __kmalloc+0x72/0x440 tty_buffer_alloc+0x23f/0x2a0 __tty_buffer_request_room+0x156/0x2a0 tty_insert_flip_string_fixed_flag+0x91/0x240 pty_write+0x11c/0x1e0 n_tty_write+0x416/0xfe0 file_tty_write.constprop.0+0x529/0x910 new_sync_write+0x437/0x660 vfs_write+0x7c2/0xad0 ksys_write+0x12d/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0f44b84b19 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:00007f0f420fa188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f0f44c97f60 RCX: 00007f0f44b84b19 RDX: 00000000fffffecb RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007f0f420fa1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffea5eee9cf R14: 00007f0f420fa300 R15: 0000000000022000 loop1: detected capacity change from 0 to 4 CPU: 0 PID: 5269 Comm: syz-executor.6 Not tainted 5.17.0-rc8-next-20220316 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 dump_stack_lvl+0x8b/0xb3 should_fail.cold+0x5/0xa should_failslab+0x5/0x10 __kmalloc+0x72/0x440 tty_buffer_alloc+0x23f/0x2a0 __tty_buffer_request_room+0x156/0x2a0 tty_insert_flip_string_fixed_flag+0x91/0x240 pty_write+0x11c/0x1e0 n_tty_write+0x416/0xfe0 file_tty_write.constprop.0+0x529/0x910 new_sync_write+0x437/0x660 vfs_write+0x7c2/0xad0 ksys_write+0x12d/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0f44b84b19 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:00007f0f420fa188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f0f44c97f60 RCX: 00007f0f44b84b19 RDX: 00000000fffffecb RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007f0f420fa1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffea5eee9cf R14: 00007f0f420fa300 R15: 0000000000022000 CPU: 1 PID: 5273 Comm: syz-executor.2 Not tainted 5.17.0-rc8-next-20220316 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 should_fail.cold+0x5/0xa should_failslab+0x5/0x10 kmem_cache_alloc+0x5b/0x480 create_object.isra.0+0x3a/0xa20 __kmalloc+0x25b/0x440 ___neigh_create+0x1459/0x27e0 arp_req_set+0x412/0x850 arp_ioctl+0x5c7/0x840 inet_ioctl+0x2f7/0x380 packet_ioctl+0xb3/0x260 sock_do_ioctl+0xd2/0x230 sock_ioctl+0x41c/0x670 __x64_sys_ioctl+0x196/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7ff16dbb1b19 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:00007ff16b127188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff16dcc4f60 RCX: 00007ff16dbb1b19 RDX: 0000000020000080 RSI: 0000000000008955 RDI: 0000000000000003 RBP: 00007ff16b1271d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc6454b9df R14: 00007ff16b127300 R15: 0000000000022000 loop4: detected capacity change from 0 to 4 EXT4-fs (loop4): fragment/cluster size (32768) != block size (2048) EXT4-fs (loop5): fragment/cluster size (32768) != block size (2048) EXT4-fs (loop1): fragment/cluster size (32768) != block size (2048)