================================ WARNING: inconsistent lock state syzkaller #0 Tainted: G L -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.2.1397/11217 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88803175d068 (&dev->spinlock){?...}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] ffff88803175d068 (&dev->spinlock){?...}-{3:3}, at: das16m1_interrupt+0x5e/0x180 drivers/comedi/drivers/das16m1.c:460 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_lock_bh+0x36/0x50 kernel/locking/spinlock.c:182 spin_lock_bh include/linux/spinlock.h:348 [inline] waveform_ao_cancel+0x8d/0x120 drivers/comedi/drivers/comedi_test.c:628 do_cancel drivers/comedi/comedi_fops.c:818 [inline] comedi_close+0x27e/0x5e0 drivers/comedi/comedi_fops.c:3036 __fput+0x44f/0xa60 fs/file_table.c:473 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x70f/0x22c0 kernel/exit.c:975 do_group_exit+0x21b/0x2d0 kernel/exit.c:1117 get_signal+0x1284/0x1330 kernel/signal.c:3037 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:269 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:328 [inline] do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 1724 hardirqs last enabled at (1723): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:178 [inline] hardirqs last enabled at (1723): [] _raw_spin_unlock_irqrestore+0x30/0x80 kernel/locking/spinlock.c:198 hardirqs last disabled at (1724): [] common_interrupt+0x13/0xe0 arch/x86/kernel/irq.c:326 softirqs last enabled at (1446): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last enabled at (1446): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last enabled at (1446): [] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735 softirqs last disabled at (1287): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last disabled at (1287): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last disabled at (1287): [] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->spinlock); lock(&dev->spinlock); *** DEADLOCK *** 3 locks held by syz.2.1397/11217: #0: ffff888034f830a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffff888140470c70 (&buf->lock){+.+.}-{4:4}, at: tiocsti+0x1bd/0x2a0 drivers/tty/tty_io.c:2288 #2: ffff888034f832c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline] #2: ffff888034f832c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x84/0x12e0 drivers/tty/n_tty.c:1678 stack backtrace: CPU: 0 UID: 0 PID: 11217 Comm: syz.2.1397 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_usage_bug+0x28b/0x2e0 kernel/locking/lockdep.c:4042 valid_state kernel/locking/lockdep.c:4056 [inline] mark_lock_irq+0x410/0x420 kernel/locking/lockdep.c:-1 mark_lock+0x115/0x190 kernel/locking/lockdep.c:4753 mark_usage kernel/locking/lockdep.c:4639 [inline] __lock_acquire+0x661/0x2cf0 kernel/locking/lockdep.c:5191 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __raw_spin_lock include/linux/spinlock_api_smp.h:158 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:158 spin_lock include/linux/spinlock.h:342 [inline] das16m1_interrupt+0x5e/0x180 drivers/comedi/drivers/das16m1.c:460 __handle_irq_event_percpu+0x216/0x9a0 kernel/irq/handle.c:209 handle_irq_event_percpu kernel/irq/handle.c:246 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:263 handle_edge_irq+0x23b/0x9f0 kernel/irq/chip.c:855 generic_handle_irq_desc include/linux/irqdesc.h:186 [inline] handle_irq arch/x86/kernel/irq.c:262 [inline] call_irq_handler arch/x86/kernel/irq.c:-1 [inline] __common_interrupt+0x141/0x1f0 arch/x86/kernel/irq.c:333 common_interrupt+0xb6/0xe0 arch/x86/kernel/irq.c:326 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:198 Code: f7 e8 bd fd e5 f5 f7 c3 00 02 00 00 74 05 e8 60 69 11 f6 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 b4 96 d7 f5 65 8b 05 dd a7 84 07 85 c0 74 18 5b 41 5e e9 41 48 RSP: 0018:ffffc9000ccdfbf8 EFLAGS: 00000206 RAX: 0000000000000006 RBX: 0000000000000282 RCX: 0000000080000001 RDX: 0000000000000007 RSI: ffffffff8e106c7e RDI: 0000000000000001 RBP: 0000000000000000 R08: ffffffff9033bef7 R09: 1ffffffff20677de R10: dffffc0000000000 R11: fffffbfff20677df R12: ffffffff9a82c120 R13: dffffc0000000000 R14: ffffffff9a82bfe0 R15: ffffffff8f231860 spin_unlock_irqrestore include/linux/spinlock.h:408 [inline] uart_port_unlock_irqrestore include/linux/serial_core.h:788 [inline] uart_port_unlock_deref drivers/tty/serial/serial_core.c:91 [inline] uart_start drivers/tty/serial/serial_core.c:174 [inline] uart_flush_chars+0x2e8/0x6c0 drivers/tty/serial/serial_core.c:607 __receive_buf drivers/tty/n_tty.c:1620 [inline] n_tty_receive_buf_common+0xc8c/0x12e0 drivers/tty/n_tty.c:1715 tiocsti+0x218/0x2a0 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:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7efc6b19c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007efc6c0b8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007efc6b415fa0 RCX: 00007efc6b19c819 RDX: 0000200000000200 RSI: 0000000000005412 RDI: 0000000000000003 RBP: 00007efc6b232c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007efc6b416038 R14: 00007efc6b415fa0 R15: 00007ffe5dd92748 comedi comedi0: fifo overflow ---------------- Code disassembly (best guess): 0: f7 e8 imul %eax 2: bd fd e5 f5 f7 mov $0xf7f5e5fd,%ebp 7: c3 ret 8: 00 02 add %al,(%rdx) a: 00 00 add %al,(%rax) c: 74 05 je 0x13 e: e8 60 69 11 f6 call 0xf6116973 13: 9c pushf 14: 58 pop %rax 15: a9 00 02 00 00 test $0x200,%eax 1a: 75 27 jne 0x43 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 b4 96 d7 f5 call 0xf5d796e3 <-- trapping instruction 2f: 65 8b 05 dd a7 84 07 mov %gs:0x784a7dd(%rip),%eax # 0x784a813 36: 85 c0 test %eax,%eax 38: 74 18 je 0x52 3a: 5b pop %rbx 3b: 41 5e pop %r14 3d: e9 .byte 0xe9 3e: 41 rex.B 3f: 48 rex.W