Warning: Permanently added '10.128.0.7' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 40.930748] FAULT_INJECTION: forcing a failure. [ 40.930748] name failslab, interval 1, probability 0, space 0, times 1 [ 40.942740] CPU: 1 PID: 7980 Comm: syz-executor252 Not tainted 4.14.302-syzkaller #0 [ 40.950612] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 40.959952] Call Trace: [ 40.962706] dump_stack+0x1b2/0x281 [ 40.966313] should_fail.cold+0x10a/0x149 [ 40.970444] ? trace_hardirqs_on+0x10/0x10 [ 40.974740] should_failslab+0xd6/0x130 [ 40.978688] __kmalloc+0x6d/0x400 [ 40.982208] ? tty_buffer_alloc+0xc0/0x270 [ 40.986458] tty_buffer_alloc+0xc0/0x270 [ 40.990516] __tty_buffer_request_room+0x12c/0x290 [ 40.995429] tty_insert_flip_string_fixed_flag+0x8b/0x210 [ 41.000946] tty_insert_flip_string_and_push_buffer+0x3e/0x160 [ 41.007031] pty_write+0xc3/0xf0 [ 41.010382] tty_send_xchar+0x245/0x360 [ 41.014340] ? tty_write_message+0x130/0x130 [ 41.018750] ? __ldsem_down_write_nested+0x631/0x700 [ 41.023830] n_tty_ioctl_helper+0x145/0x350 [ 41.028142] n_tty_ioctl+0x47/0x2e0 [ 41.031756] tty_ioctl+0x5af/0x1430 [ 41.035366] ? n_tty_poll+0x7d0/0x7d0 [ 41.039145] ? tty_fasync+0x2c0/0x2c0 [ 41.042919] ? proc_fail_nth_write+0x7b/0x180 [ 41.047409] ? proc_tgid_io_accounting+0x7a0/0x7a0 [ 41.052404] ? fsnotify+0x974/0x11b0 [ 41.056180] ? proc_tgid_io_accounting+0x7a0/0x7a0 [ 41.061220] ? debug_check_no_obj_freed+0x2c0/0x680 [ 41.066226] ? tty_fasync+0x2c0/0x2c0 [ 41.070005] do_vfs_ioctl+0x75a/0xff0 [ 41.073788] ? ioctl_preallocate+0x1a0/0x1a0 [ 41.078174] ? vfs_write+0x319/0x4d0 [ 41.081875] ? SyS_write+0x14d/0x210 [ 41.085560] ? security_file_ioctl+0x83/0xb0 [ 41.089947] SyS_ioctl+0x7f/0xb0 [ 41.093285] ? do_vfs_ioctl+0xff0/0xff0 [ 41.097233] do_syscall_64+0x1d5/0x640 [ 41.101098] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 41.106259] RIP: 0033:0x7fac65cac679 [ 41.109959] RSP: 002b:00007ffce3948e28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 41.117639] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fac65cac679 [ 41.124882] RDX: 0000000000000003 RSI: 000000000000540a RDI: 0000000000000003 [ 41.132133] RBP: 00007ffce3948e30 R08: 0000000000000001 R09: 00007fac65c70031 [ 41.139384] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 41.146861] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 41.154332] [ 41.154334] ====================================================== [ 41.154336] WARNING: possible circular locking dependency detected [ 41.154337] 4.14.302-syzkaller #0 Not tainted [ 41.154339] ------------------------------------------------------ [ 41.154341] syz-executor252/7980 is trying to acquire lock: [ 41.154342] (console_owner){....}, at: [] console_unlock+0x307/0xf20 [ 41.154346] [ 41.154347] but task is already holding lock: [ 41.154348] (&(&port->lock)->rlock){-.-.}, at: [] tty_insert_flip_string_and_push_buffer+0x2b/0x160 [ 41.154353] [ 41.154354] which lock already depends on the new lock. [ 41.154355] [ 41.154356] [ 41.154357] the existing dependency chain (in reverse order) is: [ 41.154358] [ 41.154359] -> #2 (&(&port->lock)->rlock){-.-.}: [ 41.154363] _raw_spin_lock_irqsave+0x8c/0xc0 [ 41.154364] tty_port_tty_get+0x1d/0x80 [ 41.154366] tty_port_default_wakeup+0x11/0x40 [ 41.154367] serial8250_tx_chars+0x3fe/0xc70 [ 41.154369] serial8250_handle_irq.part.0+0x2c7/0x390 [ 41.154370] serial8250_default_handle_irq+0x8a/0x1f0 [ 41.154372] serial8250_interrupt+0xf3/0x210 [ 41.154373] __handle_irq_event_percpu+0xee/0x7f0 [ 41.154374] handle_irq_event+0xed/0x240 [ 41.154376] handle_edge_irq+0x224/0xc40 [ 41.154377] handle_irq+0x35/0x50 [ 41.154378] do_IRQ+0x93/0x1d0 [ 41.154379] ret_from_intr+0x0/0x1e [ 41.154380] native_safe_halt+0xe/0x10 [ 41.154381] default_idle+0x47/0x370 [ 41.154383] do_idle+0x250/0x3c0 [ 41.154384] cpu_startup_entry+0x14/0x20 [ 41.154385] start_kernel+0x743/0x763 [ 41.154386] secondary_startup_64+0xa5/0xb0 [ 41.154387] [ 41.154388] -> #1 (&port_lock_key){-.-.}: [ 41.154392] _raw_spin_lock_irqsave+0x8c/0xc0 [ 41.154393] serial8250_console_write+0x8cb/0xb40 [ 41.154394] console_unlock+0x99d/0xf20 [ 41.154396] vprintk_emit+0x224/0x620 [ 41.154397] vprintk_func+0x58/0x160 [ 41.154398] printk+0x9e/0xbc [ 41.154399] register_console+0x6f4/0xad0 [ 41.154401] univ8250_console_init+0x2f/0x3a [ 41.154402] console_init+0x46/0x53 [ 41.154403] start_kernel+0x521/0x763 [ 41.154404] secondary_startup_64+0xa5/0xb0 [ 41.154405] [ 41.154405] -> #0 (console_owner){....}: [ 41.154409] lock_acquire+0x170/0x3f0 [ 41.154411] console_unlock+0x36f/0xf20 [ 41.154412] vprintk_emit+0x224/0x620 [ 41.154413] vprintk_func+0x58/0x160 [ 41.154414] printk+0x9e/0xbc [ 41.154416] should_fail.cold+0xdf/0x149 [ 41.154417] should_failslab+0xd6/0x130 [ 41.154418] __kmalloc+0x6d/0x400 [ 41.154419] tty_buffer_alloc+0xc0/0x270 [ 41.154421] __tty_buffer_request_room+0x12c/0x290 [ 41.154422] tty_insert_flip_string_fixed_flag+0x8b/0x210 [ 41.154424] tty_insert_flip_string_and_push_buffer+0x3e/0x160 [ 41.154425] pty_write+0xc3/0xf0 [ 41.154426] tty_send_xchar+0x245/0x360 [ 41.154428] n_tty_ioctl_helper+0x145/0x350 [ 41.154429] n_tty_ioctl+0x47/0x2e0 [ 41.154430] tty_ioctl+0x5af/0x1430 [ 41.154431] do_vfs_ioctl+0x75a/0xff0 [ 41.154432] SyS_ioctl+0x7f/0xb0 [ 41.154434] do_syscall_64+0x1d5/0x640 [ 41.154435] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 41.154436] [ 41.154437] other info that might help us debug this: [ 41.154438] [ 41.154439] Chain exists of: [ 41.154439] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 41.154445] [ 41.154446] Possible unsafe locking scenario: [ 41.154447] [ 41.154448] CPU0 CPU1 [ 41.154449] ---- ---- [ 41.154450] lock(&(&port->lock)->rlock); [ 41.154453] lock(&port_lock_key); [ 41.154455] lock(&(&port->lock)->rlock); [ 41.154458] lock(console_owner); [ 41.154460] [ 41.154461] *** DEADLOCK *** [ 41.154462] [ 41.154463] 5 locks held by syz-executor252/7980: [ 41.154464] #0: (&tty->ldisc_sem){++++}, at: [] tty_ldisc_ref_wait+0x22/0x80 [ 41.154468] #1: (&tty->atomic_write_lock){+.+.}, at: [] tty_send_xchar+0x1b5/0x360 [ 41.154477] #2: (&tty->termios_rwsem){++++}, at: [] tty_send_xchar+0x1e8/0x360 [ 41.154481] #3: (&(&port->lock)->rlock){-.-.}, at: [] tty_insert_flip_string_and_push_buffer+0x2b/0x160 [ 41.154486] #4: (console_lock){+.+.}, at: [] vprintk_func+0x58/0x160 [ 41.154490] [ 41.154491] stack backtrace: [ 41.154493] CPU: 1 PID: 7980 Comm: syz-executor252 Not tainted 4.14.302-syzkaller #0 [ 41.154496] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 41.154497] Call Trace: [ 41.154498] dump_stack+0x1b2/0x281 [ 41.154499] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 41.154501] __lock_acquire+0x2e0e/0x3f20 [ 41.154502] ? trace_hardirqs_on+0x10/0x10 [ 41.154503] ? snprintf+0xd0/0xd0 [ 41.154504] ? console_unlock+0x34a/0xf20 [ 41.154505] lock_acquire+0x170/0x3f0 [ 41.154507] ? console_unlock+0x307/0xf20 [ 41.154508] console_unlock+0x36f/0xf20 [ 41.154509] ? console_unlock+0x307/0xf20 [ 41.154510] vprintk_emit+0x224/0x620 [ 41.154511] vprintk_func+0x58/0x160 [ 41.154512] printk+0x9e/0xbc [ 41.154514] ? log_store.cold+0x16/0x16 [ 41.154515] ? ___ratelimit+0x2b5/0x510 [ 41.154516] should_fail.cold+0xdf/0x149 [ 41.154517] ? trace_hardirqs_on+0x10/0x10 [ 41.154518] should_failslab+0xd6/0x130 [ 41.154519] __kmalloc+0x6d/0x400 [ 41.154521] ? tty_buffer_alloc+0xc0/0x270 [ 41.154522] tty_buffer_alloc+0xc0/0x270 [ 41.154523] __tty_buffer_request_room+0x12c/0x290 [ 41.154525] tty_insert_flip_string_fixed_flag+0x8b/0x210 [ 41.154527] tty_insert_flip_string_and_push_buffer+0x3e/0x160 [ 41.154528] pty_write+0xc3/0xf0 [ 41.154529] tty_send_xchar+0x245/0x360 [ 41.154530] ? tty_write_message+0x130/0x130 [ 41.154532] ? __ldsem_down_write_nested+0x631/0x700 [ 41.154533] n_tty_ioctl_helper+0x145/0x350 [ 41.154534] n_tty_ioctl+0x47/0x2e0 [ 41.154535] tty_ioctl+0x5af/0x1430 [ 41.154536] ? n_tty_poll+0x7d0/0x7d0 [ 41.154538] ? tty_fasync+0x2c0/0x2c0 [ 41.154539] ? proc_fail_nth_write+0x7b/0x180 [ 41.154540] ? proc_tgid_io_accounting+0x7a0/0x7a0 [ 41.154541] ? fsnotify+0x974/0x11b0 [ 41.154543] ? proc_tgid_io_accounting+0x7a0/0x7a0 [ 41.154544] ? debug_check_no_obj_freed+0x2c0/0x680 [ 41.154545] ? tty_fasync+0x2c0/0x2c0 [ 41.154547] do_vfs_ioctl+0x75a/0xff0 [ 41.154548] ? ioctl_preallocate+0x1a0/0x1a0 [ 41.154549] ? vfs_write+0x319/0x4d0 [ 41.154550] ? SyS_write+0x14d/0x210 [ 41.154551] ? security_file_ioctl+0x83/0xb0 [ 41.154553] SyS_ioctl+0x7f/0xb0 [ 41.154554] ? do_vfs_ioctl+0xff0/0xff0 [ 41.154555] do_syscall_64+0x1d5/0x640 [ 41.154556] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 41.154557] RIP: 0033:0x7fac65cac679 [ 41.154559] RSP: 002b:00007ffce3948e28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 41.154562] RAX: fffffffffff