keytouch 0003:0926:3333.001C: input,hidraw0: USB HID v0.00 Keyboard [HID 0926:3333] on usb-dummy_hcd.0-1/input0 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/0:3/5867 is trying to acquire lock: ffff88801a4990b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:229 but task is already holding lock: ffffffff8e12e380 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:999 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (console_lock){+.+.}-{0:0}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 console_lock+0x164/0x1b0 kernel/printk/printk.c:2849 con_flush_chars+0x70/0x280 drivers/tty/vt/vt.c:3585 n_tty_write+0xf1d/0x1200 drivers/tty/n_tty.c:2393 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write+0x554/0xa20 drivers/tty/tty_io.c:1081 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&tty->termios_rwsem){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 tty_unthrottle+0x23/0x110 drivers/tty/tty_ioctl.c:103 tiocsti+0x23c/0x2c0 drivers/tty/tty_io.c:2290 tty_ioctl+0x626/0xde0 drivers/tty/tty_io.c:2706 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&buf->lock){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:598 [inline] __mutex_lock+0x187/0x1350 kernel/locking/mutex.c:760 tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:229 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388 __do_SAK+0xf2/0x6e0 drivers/tty/tty_io.c:3025 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:1009 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x439/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Chain exists of: &buf->lock --> &tty->termios_rwsem --> console_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(console_lock); lock(&tty->termios_rwsem); lock(console_lock); lock(&buf->lock); *** DEADLOCK *** 4 locks held by kworker/0:3/5867: #0: ffff88801a478d48 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline] #0: ffff88801a478d48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0 kernel/workqueue.c:3319 #1: ffffc90003fcfbc0 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline] #1: ffffc90003fcfbc0 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0 kernel/workqueue.c:3319 #2: ffffffff8e12e380 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:999 #3: ffff88806d1b90a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline] #3: ffff88806d1b90a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386 stack backtrace: CPU: 0 UID: 0 PID: 5867 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Workqueue: events vc_SAK Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2043 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:598 [inline] __mutex_lock+0x187/0x1350 kernel/locking/mutex.c:760 tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:229 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388 __do_SAK+0xf2/0x6e0 drivers/tty/tty_io.c:3025 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:1009 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x439/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 tty tty1: SAK: killed process 1318 (syz.3.6873): by fd#7 tty tty1: SAK: killed process 1319 (syz.3.6873): by fd#7 tty tty1: SAK: killed process 1320 (syz.3.6873): by fd#7 tty tty1: SAK: killed process 1321 (syz.3.6873): by fd#7 tty tty1: SAK: killed process 1322 (syz.3.6873): by fd#7