Warning: Permanently added '10.128.0.13' (ECDSA) to the list of known hosts. executing program [ 37.826108] FAULT_INJECTION: forcing a failure. [ 37.826108] name failslab, interval 1, probability 0, space 0, times 1 [ 37.838490] CPU: 0 PID: 8104 Comm: syz-executor345 Not tainted 4.19.211-syzkaller #0 [ 37.846370] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 37.855709] Call Trace: [ 37.858318] dump_stack+0x1fc/0x2ef [ 37.862049] should_fail.cold+0xa/0xf [ 37.865841] ? setup_fault_attr+0x200/0x200 [ 37.870153] ? mark_held_locks+0xf0/0xf0 [ 37.874194] __should_failslab+0x115/0x180 [ 37.878411] should_failslab+0x5/0x10 [ 37.882281] __kmalloc+0x6d/0x3c0 [ 37.885713] ? tty_buffer_alloc+0x23f/0x2a0 [ 37.890045] ? __mutex_lock+0x368/0x1190 [ 37.894111] tty_buffer_alloc+0x23f/0x2a0 [ 37.898254] __tty_buffer_request_room+0x156/0x2a0 [ 37.903257] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.908778] ? do_raw_spin_lock+0xcb/0x220 [ 37.913084] pty_write+0x126/0x1f0 [ 37.916607] n_tty_write+0xa03/0xff0 [ 37.920311] ? n_tty_open+0x160/0x160 [ 37.924101] ? do_wait_intr_irq+0x270/0x270 [ 37.928495] ? __might_fault+0x192/0x1d0 [ 37.933580] tty_write+0x496/0x810 [ 37.937285] ? n_tty_open+0x160/0x160 [ 37.941331] __vfs_write+0xf7/0x770 [ 37.944946] ? tty_compat_ioctl+0x270/0x270 [ 37.949596] ? common_file_perm+0x4e5/0x850 [ 37.953903] ? kernel_read+0x110/0x110 [ 37.957947] ? trace_hardirqs_off+0x64/0x200 [ 37.962350] ? apparmor_getprocattr+0x11e0/0x11e0 [ 37.967195] ? vfs_write+0x3d7/0x540 [ 37.970911] ? security_file_permission+0x1c0/0x220 [ 37.975915] vfs_write+0x1f3/0x540 [ 37.979439] ksys_write+0x12b/0x2a0 [ 37.983145] ? __ia32_sys_read+0xb0/0xb0 [ 37.987196] ? trace_hardirqs_off_caller+0x6e/0x210 [ 37.992379] ? do_syscall_64+0x21/0x620 [ 37.996355] do_syscall_64+0xf9/0x620 [ 38.000149] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.005321] RIP: 0033:0x7fe1888c6679 [ 38.009033] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48 [ 38.028016] RSP: 002b:00007ffeb533c008 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 38.035724] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fe1888c6679 [ 38.043062] RDX: 000000000000ff2e RSI: 0000000020000000 RDI: 0000000000000003 [ 38.050409] RBP: 00007ffeb533c010 R08: 0000000000000001 R09: 00007fe188880033 [ 38.057841] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 38.065092] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 38.072356] [ 38.072359] ====================================================== [ 38.072362] WARNING: possible circular locking dependency detected [ 38.072364] 4.19.211-syzkaller #0 Not tainted [ 38.072368] ------------------------------------------------------ [ 38.072370] syz-executor345/8104 is trying to acquire lock: [ 38.072372] 00000000ab672ec3 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 38.072380] [ 38.072382] but task is already holding lock: [ 38.072384] 00000000dfca9e57 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 38.072391] [ 38.072393] which lock already depends on the new lock. [ 38.072394] [ 38.072396] [ 38.072398] the existing dependency chain (in reverse order) is: [ 38.072399] [ 38.072401] -> #2 (&(&port->lock)->rlock){-.-.}: [ 38.072408] tty_port_tty_get+0x1d/0x80 [ 38.072410] tty_port_default_wakeup+0x11/0x40 [ 38.072412] serial8250_tx_chars+0x490/0xaf0 [ 38.072415] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 38.072417] serial8250_default_handle_irq+0xae/0x220 [ 38.072420] serial8250_interrupt+0x101/0x240 [ 38.072422] __handle_irq_event_percpu+0x27e/0x8e0 [ 38.072424] handle_irq_event+0x102/0x290 [ 38.072426] handle_edge_irq+0x260/0xcf0 [ 38.072428] handle_irq+0x35/0x50 [ 38.072430] do_IRQ+0x93/0x1c0 [ 38.072432] ret_from_intr+0x0/0x1e [ 38.072434] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 38.072436] uart_write+0x3bb/0x6f0 [ 38.072438] do_output_char+0x5de/0x850 [ 38.072440] n_tty_write+0x46e/0xff0 [ 38.072442] tty_write+0x496/0x810 [ 38.072444] redirected_tty_write+0xaa/0xb0 [ 38.072446] do_iter_write+0x461/0x5d0 [ 38.072448] vfs_writev+0x153/0x2e0 [ 38.072450] do_writev+0x136/0x330 [ 38.072452] do_syscall_64+0xf9/0x620 [ 38.072455] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.072456] [ 38.072457] -> #1 (&port_lock_key){-.-.}: [ 38.072464] serial8250_console_write+0x90e/0xb70 [ 38.072466] console_unlock+0xbb6/0x1110 [ 38.072468] vprintk_emit+0x2d1/0x740 [ 38.072470] vprintk_func+0x79/0x180 [ 38.072472] printk+0xba/0xed [ 38.072474] register_console+0x87f/0xc90 [ 38.072476] univ8250_console_init+0x3a/0x46 [ 38.072478] console_init+0x4cb/0x718 [ 38.072480] start_kernel+0x686/0x911 [ 38.072482] secondary_startup_64+0xa4/0xb0 [ 38.072483] [ 38.072484] -> #0 (console_owner){....}: [ 38.072492] console_unlock+0x411/0x1110 [ 38.072494] vprintk_emit+0x2d1/0x740 [ 38.072496] vprintk_func+0x79/0x180 [ 38.072497] printk+0xba/0xed [ 38.072499] should_fail+0x66b/0x7b0 [ 38.072501] __should_failslab+0x115/0x180 [ 38.072504] should_failslab+0x5/0x10 [ 38.072505] __kmalloc+0x6d/0x3c0 [ 38.072508] tty_buffer_alloc+0x23f/0x2a0 [ 38.072510] __tty_buffer_request_room+0x156/0x2a0 [ 38.072513] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 38.072515] pty_write+0x126/0x1f0 [ 38.072516] n_tty_write+0xa03/0xff0 [ 38.072518] tty_write+0x496/0x810 [ 38.072520] __vfs_write+0xf7/0x770 [ 38.072522] vfs_write+0x1f3/0x540 [ 38.072524] ksys_write+0x12b/0x2a0 [ 38.072526] do_syscall_64+0xf9/0x620 [ 38.072529] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.072530] [ 38.072532] other info that might help us debug this: [ 38.072533] [ 38.072535] Chain exists of: [ 38.072536] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 38.072545] [ 38.072547] Possible unsafe locking scenario: [ 38.072548] [ 38.072550] CPU0 CPU1 [ 38.072553] ---- ---- [ 38.072554] lock(&(&port->lock)->rlock); [ 38.072559] lock(&port_lock_key); [ 38.072564] lock(&(&port->lock)->rlock); [ 38.072568] lock(console_owner); [ 38.072571] [ 38.072573] *** DEADLOCK *** [ 38.072574] [ 38.072576] 6 locks held by syz-executor345/8104: [ 38.072577] #0: 00000000bc3236f6 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 38.072586] #1: 00000000462bc231 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 38.072595] #2: 00000000829efd99 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 38.072603] #3: 000000004a7b0856 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 38.072611] #4: 00000000dfca9e57 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 38.072620] #5: 00000000f1f80a10 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 38.072628] [ 38.072630] stack backtrace: [ 38.072633] CPU: 0 PID: 8104 Comm: syz-executor345 Not tainted 4.19.211-syzkaller #0 [ 38.072637] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 38.072638] Call Trace: [ 38.072640] dump_stack+0x1fc/0x2ef [ 38.072643] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 38.072645] __lock_acquire+0x30c9/0x3ff0 [ 38.072647] ? mark_held_locks+0xf0/0xf0 [ 38.072649] ? snprintf+0xf0/0xf0 [ 38.072651] ? console_unlock+0x3ec/0x1110 [ 38.072653] lock_acquire+0x170/0x3c0 [ 38.072655] ? console_unlock+0x3a9/0x1110 [ 38.072657] console_unlock+0x411/0x1110 [ 38.072659] ? console_unlock+0x3a9/0x1110 [ 38.072661] vprintk_emit+0x2d1/0x740 [ 38.072663] vprintk_func+0x79/0x180 [ 38.072665] printk+0xba/0xed [ 38.072667] ? log_store.cold+0x16/0x16 [ 38.072669] ? __lock_acquire+0x22f9/0x3ff0 [ 38.072671] ? ___ratelimit+0x319/0x590 [ 38.072673] should_fail+0x66b/0x7b0 [ 38.072675] ? setup_fault_attr+0x200/0x200 [ 38.072677] ? mark_held_locks+0xf0/0xf0 [ 38.072679] __should_failslab+0x115/0x180 [ 38.072681] should_failslab+0x5/0x10 [ 38.072683] __kmalloc+0x6d/0x3c0 [ 38.072685] ? tty_buffer_alloc+0x23f/0x2a0 [ 38.072688] ? __mutex_lock+0x368/0x1190 [ 38.072690] tty_buffer_alloc+0x23f/0x2a0 [ 38.072692] __tty_buffer_request_room+0x156/0x2a0 [ 38.072694] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 38.072697] ? do_raw_spin_lock+0xcb/0x220 [ 38.072698] pty_write+0x126/0x1f0 [ 38.072700] n_tty_write+0xa03/0xff0 [ 38.072702] ? n_tty_open+0x160/0x160 [ 38.072704] ? do_wait_intr_irq+0x270/0x270 [ 38.072707] ? __might_fault+0x192/0x1d0 [ 38.072708] tty_write+0x496/0x810 [ 38.072710] ? n_tty_open+0x160/0x160 [ 38.072712] __vfs_write+0xf7/0x770 [ 38.072714] ? tty_compat_ioctl+0x270/0x270 [ 38.072717] ? common_file_perm+0x4e5/0x850 [ 38.072719] ? kernel_read+0x110/0x110 [ 38.072721] ? trace_hardirqs_off+0x64/0x200 [ 38.072723] ? apparmor_getprocattr+0x11e0/0x11e0 [ 38.072725] ? vfs_write+0x3d7/0x540 [ 38.072727] ? security_file_permission+0x1c0/0x220 [ 38.072729] vfs_write+0x1f3/0x540 [ 38.072731] ksys_write+0x12b/0x2a0 [ 38.072733] ? __ia32_sys_read+0xb0/0xb0 [ 38.072736] ? trace_hardirqs_off_caller+0x6e/0x210 [ 38.072738] ? do_syscall_64+0x21/0x620 [ 38.072739] do_syscall_64+0xf9/0x620 [ 38.072742] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.072744] RIP: 0033:0x7fe1888c6679 [ 38.072751] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48 [ 38.072753] RSP: 002b:00007ffeb533c008 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 38.072758] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fe1888c6679 [ 38.072762] RDX: 000000000000ff2e RSI: 0000000020000000 RDI: 0000000000000003 [ 38.072765] RBP: 00007ffeb533c010 R08: 0000000000000001 R09: 00007fe188880033 [ 38.072768] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 38.072771] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000