================================ WARNING: inconsistent lock state syzkaller #0 Tainted: G L -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.3636/20324 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880322f2868 (&dev->spinlock){?...}-{3:3}, at: spin_lock include/linux/spinlock.h:341 [inline] ffff8880322f2868 (&dev->spinlock){?...}-{3:3}, at: das16m1_interrupt+0x68/0x120 drivers/comedi/drivers/das16m1.c:460 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:347 [inline] waveform_ao_cancel+0x96/0x150 drivers/comedi/drivers/comedi_test.c:628 do_cancel+0xf4/0x180 drivers/comedi/comedi_fops.c:818 comedi_close+0x2f6/0x470 drivers/comedi/comedi_fops.c:3036 __fput+0x3ff/0xb40 fs/file_table.c:469 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0x100/0x4a0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x67c/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 1500 hardirqs last enabled at (1499): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:178 [inline] hardirqs last enabled at (1499): [] _raw_spin_unlock_irqrestore+0x52/0x80 kernel/locking/spinlock.c:194 hardirqs last disabled at (1500): [] common_interrupt+0x19/0xe0 arch/x86/kernel/irq.c:326 softirqs last enabled at (1434): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last enabled at (1434): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last enabled at (1434): [] __irq_exit_rcu+0xef/0x150 kernel/softirq.c:723 softirqs last disabled at (1303): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last disabled at (1303): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last disabled at (1303): [] __irq_exit_rcu+0xef/0x150 kernel/softirq.c:723 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->spinlock); lock(&dev->spinlock); *** DEADLOCK *** 2 locks held by syz.0.3636/20324: #0: ffff8880840f72e8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline] #0: ffff8880840f72e8 (&tty->termios_rwsem){++++}-{4:4}, at: uart_ioctl+0x352/0x2ef0 drivers/tty/serial/serial_core.c:1564 #1: ffff8880264b8e90 (&port->mutex){+.+.}-{4:4}, at: class_mutex_intr_constructor include/linux/mutex.h:255 [inline] #1: ffff8880264b8e90 (&port->mutex){+.+.}-{4:4}, at: uart_do_autoconfig drivers/tty/serial/serial_core.c:1148 [inline] #1: ffff8880264b8e90 (&port->mutex){+.+.}-{4:4}, at: uart_ioctl+0x386/0x2ef0 drivers/tty/serial/serial_core.c:1565 stack backtrace: CPU: 0 UID: 0 PID: 20324 Comm: syz.0.3636 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_usage_bug.part.0+0x257/0x340 kernel/locking/lockdep.c:4042 print_usage_bug kernel/locking/lockdep.c:4010 [inline] valid_state kernel/locking/lockdep.c:4056 [inline] mark_lock_irq kernel/locking/lockdep.c:4267 [inline] mark_lock+0x74a/0xa20 kernel/locking/lockdep.c:4753 mark_usage kernel/locking/lockdep.c:4639 [inline] __lock_acquire+0x10ff/0x2630 kernel/locking/lockdep.c:5191 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __raw_spin_lock include/linux/spinlock_api_smp.h:158 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:341 [inline] das16m1_interrupt+0x68/0x120 drivers/comedi/drivers/das16m1.c:460 __handle_irq_event_percpu+0x232/0x8e0 kernel/irq/handle.c:209 handle_irq_event_percpu kernel/irq/handle.c:246 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:263 handle_edge_irq+0x375/0x970 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:318 [inline] __common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:333 common_interrupt+0xb9/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+0x31/0x80 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 16 3d 51 f6 48 89 df e8 fe 8c 51 f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 b5 ad 41 f6 65 8b 05 5e 6e 7a 08 85 c0 74 16 5b RSP: 0018:ffffc9000622fa68 EFLAGS: 00000246 RAX: 0000000000000006 RBX: ffffffff9b4aa680 RCX: 0000000000000040 RDX: 0000000000000000 RSI: ffffffff8de7978e RDI: ffffffff8c1b17a0 RBP: 0000000000000287 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8f513740 R13: 0000000000000003 R14: 0000000000000001 R15: 1ffff92000c45f5c spin_unlock_irqrestore include/linux/spinlock.h:407 [inline] uart_port_unlock_irqrestore include/linux/serial_core.h:788 [inline] autoconfig drivers/tty/serial/8250/8250_port.c:1201 [inline] serial8250_config_port drivers/tty/serial/8250/8250_port.c:3097 [inline] serial8250_config_port+0x1897/0x4ec0 drivers/tty/serial/8250/8250_port.c:3080 univ8250_config_port+0x25a/0x380 drivers/tty/serial/8250/8250_rsa.c:72 uart_do_autoconfig drivers/tty/serial/serial_core.c:1173 [inline] uart_ioctl+0x14cc/0x2ef0 drivers/tty/serial/serial_core.c:1565 tty_ioctl+0x26a/0x1690 drivers/tty/tty_io.c:2792 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb45cb9c799 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:00007fb45d9ac028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fb45ce15fa0 RCX: 00007fb45cb9c799 RDX: 0000000000000000 RSI: 0000000000005453 RDI: 0000000000000003 RBP: 00007fb45cc32c99 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb45ce16038 R14: 00007fb45ce15fa0 R15: 00007ffd2e3fa328 comedi comedi2: fifo overflow ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 16 3d 51 f6 call 0xf6513d29 13: 48 89 df mov %rbx,%rdi 16: e8 fe 8c 51 f6 call 0xf6518d19 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 23 jne 0x46 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 37 jne 0x61 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 b5 ad 41 f6 call 0xf641ade9 34: 65 8b 05 5e 6e 7a 08 mov %gs:0x87a6e5e(%rip),%eax # 0x87a6e99 3b: 85 c0 test %eax,%eax 3d: 74 16 je 0x55 3f: 5b pop %rbx