================================ WARNING: inconsistent lock state syzkaller #0 Tainted: G L -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.3171/18566 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff88803322a868 (&dev->spinlock){?...}-{3:3}, at: spin_lock include/linux/spinlock.h:341 [inline] ffff88803322a868 (&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 get_signal+0x1bd/0x21e0 kernel/signal.c:2807 arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/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: 2049 hardirqs last enabled at (2048): [] handle_softirqs+0x1a9/0x9e0 kernel/softirq.c:606 hardirqs last disabled at (2049): [] common_interrupt+0x19/0xe0 arch/x86/kernel/irq.c:326 softirqs last enabled at (2040): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last enabled at (2040): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last enabled at (2040): [] __irq_exit_rcu+0xef/0x150 kernel/softirq.c:723 softirqs last disabled at (2047): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last disabled at (2047): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last disabled at (2047): [] __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.3171/18566: #0: ffff8880500612e8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline] #0: ffff8880500612e8 (&tty->termios_rwsem){++++}-{4:4}, at: uart_ioctl+0x352/0x2ef0 drivers/tty/serial/serial_core.c:1564 #1: ffff8881436a8e90 (&port->mutex){+.+.}-{4:4}, at: class_mutex_intr_constructor include/linux/mutex.h:255 [inline] #1: ffff8881436a8e90 (&port->mutex){+.+.}-{4:4}, at: uart_do_autoconfig drivers/tty/serial/serial_core.c:1148 [inline] #1: ffff8881436a8e90 (&port->mutex){+.+.}-{4:4}, at: uart_ioctl+0x386/0x2ef0 drivers/tty/serial/serial_core.c:1565 stack backtrace: CPU: 0 UID: 0 PID: 18566 Comm: syz.0.3171 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+0x60/0xe0 arch/x86/kernel/irq.c:326 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 RIP: 0010:handle_softirqs+0x1af/0x9e0 kernel/softirq.c:608 Code: 89 64 24 18 44 88 6c 24 1e 48 c7 c7 a0 72 ad 8b e8 c6 8a c7 09 31 d2 65 66 89 15 e4 f5 44 12 e8 07 c6 47 00 fb bb ff ff ff ff <49> c7 c6 c0 c0 40 8e 41 0f bc df 83 c3 01 0f 85 a3 00 00 00 e9 48 RSP: 0018:ffffc90000007f30 EFLAGS: 00000216 RAX: 0000000000000800 RBX: 00000000ffffffff RCX: 0000000000000004 RDX: 0000000000000000 RSI: ffffffff8de788ab RDI: ffffffff8c1b1220 RBP: 00000001000164e3 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 000000000000000a R13: 0000000000000000 R14: 0000000000400140 R15: 0000000000000100 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xef/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 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 9d 51 f6 48 89 df e8 fe ec 51 f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 b5 0d 42 f6 65 8b 05 5e 9e 7a 08 85 c0 74 16 5b RSP: 0018:ffffc90003f47a68 EFLAGS: 00000246 RAX: 0000000000000002 RBX: ffffffff9b4a7640 RCX: 0000000000000040 RDX: 0000000000000000 RSI: ffffffff8de788ab RDI: ffffffff8c1b1220 RBP: 0000000000000287 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8f5129e0 R13: 0000000000000003 R14: 0000000000000001 R15: 1ffff920007e8f5c 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:0x7fc8a159c799 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:00007fc8a23d7028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc8a1815fa0 RCX: 00007fc8a159c799 RDX: 000000000300fff2 RSI: 0000000000005453 RDI: 0000000000000003 RBP: 00007fc8a1632c99 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc8a1816038 R14: 00007fc8a1815fa0 R15: 00007ffcfacb6088 comedi comedi2: fifo overflow ---------------- Code disassembly (best guess): 0: 89 64 24 18 mov %esp,0x18(%rsp) 4: 44 88 6c 24 1e mov %r13b,0x1e(%rsp) 9: 48 c7 c7 a0 72 ad 8b mov $0xffffffff8bad72a0,%rdi 10: e8 c6 8a c7 09 call 0x9c78adb 15: 31 d2 xor %edx,%edx 17: 65 66 89 15 e4 f5 44 mov %dx,%gs:0x1244f5e4(%rip) # 0x1244f603 1e: 12 1f: e8 07 c6 47 00 call 0x47c62b 24: fb sti 25: bb ff ff ff ff mov $0xffffffff,%ebx * 2a: 49 c7 c6 c0 c0 40 8e mov $0xffffffff8e40c0c0,%r14 <-- trapping instruction 31: 41 0f bc df bsf %r15d,%ebx 35: 83 c3 01 add $0x1,%ebx 38: 0f 85 a3 00 00 00 jne 0xe1 3e: e9 .byte 0xe9 3f: 48 rex.W