Warning: Permanently added '10.128.1.122' (ECDSA) to the list of known hosts. executing program [ 43.427491] FAULT_INJECTION: forcing a failure. [ 43.427491] name failslab, interval 1, probability 0, space 0, times 1 [ 43.440208] CPU: 1 PID: 8105 Comm: syz-executor885 Not tainted 4.19.211-syzkaller #0 [ 43.448064] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 43.457390] Call Trace: [ 43.459958] dump_stack+0x1fc/0x2ef [ 43.463567] should_fail.cold+0xa/0xf [ 43.467347] ? setup_fault_attr+0x200/0x200 [ 43.471648] ? mark_held_locks+0xf0/0xf0 [ 43.475706] ? lock_acquire+0x170/0x3c0 [ 43.479658] __should_failslab+0x115/0x180 [ 43.483881] should_failslab+0x5/0x10 [ 43.487661] __kmalloc+0x6d/0x3c0 [ 43.491103] ? tty_buffer_alloc+0x23f/0x2a0 [ 43.495418] ? __mutex_lock+0x368/0x1190 [ 43.499460] tty_buffer_alloc+0x23f/0x2a0 [ 43.503589] __tty_buffer_request_room+0x156/0x2a0 [ 43.508499] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 43.514014] ? do_raw_spin_lock+0xcb/0x220 [ 43.518230] pty_write+0x126/0x1f0 [ 43.521759] n_tty_write+0xa03/0xff0 [ 43.525455] ? __ldsem_down_read_nested+0xd2/0x780 [ 43.530365] ? n_tty_open+0x160/0x160 [ 43.534146] ? do_wait_intr_irq+0x270/0x270 [ 43.538453] ? __might_fault+0x192/0x1d0 [ 43.542491] tty_write+0x496/0x810 [ 43.546011] ? n_tty_open+0x160/0x160 [ 43.549794] __vfs_write+0xf7/0x770 [ 43.553400] ? tty_compat_ioctl+0x270/0x270 [ 43.557696] ? common_file_perm+0x4e5/0x850 [ 43.561995] ? kernel_read+0x110/0x110 [ 43.565866] ? trace_hardirqs_off+0x64/0x200 [ 43.570253] ? apparmor_getprocattr+0x11e0/0x11e0 [ 43.575071] ? vfs_write+0x3d7/0x540 [ 43.578767] ? security_file_permission+0x1c0/0x220 [ 43.583765] vfs_write+0x1f3/0x540 [ 43.587286] ksys_write+0x12b/0x2a0 [ 43.591010] ? __ia32_sys_read+0xb0/0xb0 [ 43.595065] ? trace_hardirqs_off_caller+0x6e/0x210 [ 43.600082] ? do_syscall_64+0x21/0x620 [ 43.604043] do_syscall_64+0xf9/0x620 [ 43.607869] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.613049] RIP: 0033:0x7fbf5b400679 [ 43.616748] 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 [ 43.635634] RSP: 002b:00007ffc2e6dfcd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 43.643322] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fbf5b400679 [ 43.650571] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 43.657821] RBP: 00007ffc2e6dfce0 R08: 0000000000000001 R09: 00007fbf5b3c0033 [ 43.665067] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 43.672312] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 43.679594] [ 43.679598] ====================================================== [ 43.679600] WARNING: possible circular locking dependency detected [ 43.679603] 4.19.211-syzkaller #0 Not tainted [ 43.679605] ------------------------------------------------------ [ 43.679608] syz-executor885/8105 is trying to acquire lock: [ 43.679610] 00000000f1f3db58 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 43.679617] [ 43.679619] but task is already holding lock: [ 43.679621] 000000008938cbd9 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 43.679629] [ 43.679631] which lock already depends on the new lock. [ 43.679632] [ 43.679634] [ 43.679636] the existing dependency chain (in reverse order) is: [ 43.679637] [ 43.679638] -> #2 (&(&port->lock)->rlock){-.-.}: [ 43.679646] tty_port_tty_get+0x1d/0x80 [ 43.679648] tty_port_default_wakeup+0x11/0x40 [ 43.679650] serial8250_tx_chars+0x490/0xaf0 [ 43.679653] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 43.679655] serial8250_default_handle_irq+0xae/0x220 [ 43.679657] serial8250_interrupt+0x101/0x240 [ 43.679660] __handle_irq_event_percpu+0x27e/0x8e0 [ 43.679662] handle_irq_event+0x102/0x290 [ 43.679664] handle_edge_irq+0x260/0xcf0 [ 43.679666] handle_irq+0x35/0x50 [ 43.679668] do_IRQ+0x93/0x1c0 [ 43.679669] ret_from_intr+0x0/0x1e [ 43.679672] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 43.679674] uart_write+0x3bb/0x6f0 [ 43.679676] do_output_char+0x5de/0x850 [ 43.679678] n_tty_write+0x46e/0xff0 [ 43.679680] tty_write+0x496/0x810 [ 43.679682] redirected_tty_write+0xaa/0xb0 [ 43.679684] do_iter_write+0x461/0x5d0 [ 43.679686] vfs_writev+0x153/0x2e0 [ 43.679688] do_writev+0x136/0x330 [ 43.679689] do_syscall_64+0xf9/0x620 [ 43.679692] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.679693] [ 43.679694] -> #1 (&port_lock_key){-.-.}: [ 43.679701] serial8250_console_write+0x90e/0xb70 [ 43.679704] console_unlock+0xbb6/0x1110 [ 43.679706] vprintk_emit+0x2d1/0x740 [ 43.679707] vprintk_func+0x79/0x180 [ 43.679709] printk+0xba/0xed [ 43.679711] register_console+0x87f/0xc90 [ 43.679713] univ8250_console_init+0x3a/0x46 [ 43.679715] console_init+0x4cb/0x718 [ 43.679717] start_kernel+0x686/0x911 [ 43.679720] secondary_startup_64+0xa4/0xb0 [ 43.679721] [ 43.679722] -> #0 (console_owner){....}: [ 43.679729] console_unlock+0x411/0x1110 [ 43.679731] vprintk_emit+0x2d1/0x740 [ 43.679733] vprintk_func+0x79/0x180 [ 43.679735] printk+0xba/0xed [ 43.679737] should_fail+0x66b/0x7b0 [ 43.679739] __should_failslab+0x115/0x180 [ 43.679741] should_failslab+0x5/0x10 [ 43.679743] __kmalloc+0x6d/0x3c0 [ 43.679745] tty_buffer_alloc+0x23f/0x2a0 [ 43.679747] __tty_buffer_request_room+0x156/0x2a0 [ 43.679750] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 43.679752] pty_write+0x126/0x1f0 [ 43.679754] n_tty_write+0xa03/0xff0 [ 43.679756] tty_write+0x496/0x810 [ 43.679758] __vfs_write+0xf7/0x770 [ 43.679759] vfs_write+0x1f3/0x540 [ 43.679761] ksys_write+0x12b/0x2a0 [ 43.679763] do_syscall_64+0xf9/0x620 [ 43.679766] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.679767] [ 43.679769] other info that might help us debug this: [ 43.679770] [ 43.679772] Chain exists of: [ 43.679773] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 43.679782] [ 43.679784] Possible unsafe locking scenario: [ 43.679785] [ 43.679787] CPU0 CPU1 [ 43.679790] ---- ---- [ 43.679791] lock(&(&port->lock)->rlock); [ 43.679796] lock(&port_lock_key); [ 43.679800] lock(&(&port->lock)->rlock); [ 43.679805] lock(console_owner); [ 43.679808] [ 43.679810] *** DEADLOCK *** [ 43.679811] [ 43.679813] 6 locks held by syz-executor885/8105: [ 43.679814] #0: 00000000035bc445 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 43.679823] #1: 0000000035155abd (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 43.679831] #2: 000000000f1b57da (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 43.679840] #3: 000000009087450c (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 43.679848] #4: 000000008938cbd9 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 43.679857] #5: 00000000e1512994 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 43.679865] [ 43.679866] stack backtrace: [ 43.679870] CPU: 1 PID: 8105 Comm: syz-executor885 Not tainted 4.19.211-syzkaller #0 [ 43.679874] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 43.679875] Call Trace: [ 43.679877] dump_stack+0x1fc/0x2ef [ 43.679880] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 43.679882] __lock_acquire+0x30c9/0x3ff0 [ 43.679884] ? mark_held_locks+0xf0/0xf0 [ 43.679886] ? snprintf+0xf0/0xf0 [ 43.679888] ? console_unlock+0x3ec/0x1110 [ 43.679890] lock_acquire+0x170/0x3c0 [ 43.679892] ? console_unlock+0x3a9/0x1110 [ 43.679894] console_unlock+0x411/0x1110 [ 43.679896] ? console_unlock+0x3a9/0x1110 [ 43.679898] vprintk_emit+0x2d1/0x740 [ 43.679900] vprintk_func+0x79/0x180 [ 43.679902] printk+0xba/0xed [ 43.679904] ? log_store.cold+0x16/0x16 [ 43.679906] ? set_next_entity+0xb52/0x1dc0 [ 43.679908] ? __lock_acquire+0x6de/0x3ff0 [ 43.679910] ? ___ratelimit+0x319/0x590 [ 43.679912] should_fail+0x66b/0x7b0 [ 43.679914] ? setup_fault_attr+0x200/0x200 [ 43.679916] ? mark_held_locks+0xf0/0xf0 [ 43.679918] ? lock_acquire+0x170/0x3c0 [ 43.679920] __should_failslab+0x115/0x180 [ 43.679922] should_failslab+0x5/0x10 [ 43.679924] __kmalloc+0x6d/0x3c0 [ 43.679926] ? tty_buffer_alloc+0x23f/0x2a0 [ 43.679928] ? __mutex_lock+0x368/0x1190 [ 43.679931] tty_buffer_alloc+0x23f/0x2a0 [ 43.679933] __tty_buffer_request_room+0x156/0x2a0 [ 43.679935] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 43.679938] ? do_raw_spin_lock+0xcb/0x220 [ 43.679939] pty_write+0x126/0x1f0 [ 43.679941] n_tty_write+0xa03/0xff0 [ 43.679944] ? __ldsem_down_read_nested+0xd2/0x780 [ 43.679946] ? n_tty_open+0x160/0x160 [ 43.679948] ? do_wait_intr_irq+0x270/0x270 [ 43.679950] ? __might_fault+0x192/0x1d0 [ 43.679952] tty_write+0x496/0x810 [ 43.679954] ? n_tty_open+0x160/0x160 [ 43.679956] __vfs_write+0xf7/0x770 [ 43.679958] ? tty_compat_ioctl+0x270/0x270 [ 43.679960] ? common_file_perm+0x4e5/0x850 [ 43.679962] ? kernel_read+0x110/0x110 [ 43.679964] ? trace_hardirqs_off+0x64/0x200 [ 43.679966] ? apparmor_getprocattr+0x11e0/0x11e0 [ 43.679968] ? vfs_write+0x3d7/0x540 [ 43.679971] ? security_file_permission+0x1c0/0x220 [ 43.679972] vfs_write+0x1f3/0x540 [ 43.679974] ksys_write+0x12b/0x2a0 [ 43.679976] ? __ia32_sys_read+0xb0/0xb0 [ 43.679979] ? trace_hardirqs_off_caller+0x6e/0x210 [ 43.679981] ? do_syscall_64+0x21/0x620 [ 43.679983] do_syscall_64+0xf9/0x620 [ 43.679985] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.679987] RIP: 0033:0x7fbf5b400679 [ 43.679994] 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 [ 43.679997] RSP: 002b:00007ffc2e6dfcd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 43.680002] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fbf5b400679 [ 43.680005] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 43.680008] RBP: 00007ffc2e6dfce0 R08: 0000000000000001 R09: 00007fbf5b3c0033 [ 43.680011] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 43.680014] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000