================================ WARNING: inconsistent lock state syzkaller #0 Tainted: G L -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.2.6219/22575 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880320d5068 (&dev->spinlock){?...}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] ffff8880320d5068 (&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+0x451/0x8c0 fs/file_table.c:500 task_work_run+0x1d9/0x270 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+0xed/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:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 101502 hardirqs last enabled at (101501): [] seqcount_lockdep_reader_access+0x89/0xc0 include/linux/seqlock.h:75 hardirqs last disabled at (101502): [] common_interrupt+0x13/0xe0 arch/x86/kernel/irq.c:326 softirqs last enabled at (101248): [] __do_softirq kernel/softirq.c:660 [inline] softirqs last enabled at (101248): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last enabled at (101248): [] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:739 softirqs last disabled at (101155): [] __do_softirq kernel/softirq.c:660 [inline] softirqs last disabled at (101155): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last disabled at (101155): [] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:739 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->spinlock); lock(&dev->spinlock); *** DEADLOCK *** 1 lock held by syz.2.6219/22575: #0: ffff88807e458ff8 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:592 [inline] #0: ffff88807e458ff8 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x194/0x9e0 mm/mmap.c:1284 stack backtrace: CPU: 0 UID: 0 PID: 22575 Comm: syz.2.6219 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_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:get_current arch/x86/include/asm/current.h:25 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x8/0x70 kernel/kcov.c:216 Code: 8b 3d 94 6e 59 0c 48 89 de 5b e9 e3 13 5e 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0d 78 2e 57 11 65 8b 15 99 2e 57 11 81 e2 00 01 ff 00 74 RSP: 0018:ffffc90003757078 EFLAGS: 00000287 RAX: ffffffff8226c696 RBX: 00000000000000de RCX: ffff88807f385b80 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 000000000000001f RBP: ffffc90003757308 R08: ffffea00017c3ac7 R09: 1ffffd40002f8758 R10: dffffc0000000000 R11: fffff940002f8759 R12: 0000000000000005 R13: dffffc0000000000 R14: 0000000000000005 R15: ffffc900037570e0 free_pages_and_swap_cache+0x2d6/0x490 mm/swap_state.c:391 __tlb_batch_free_encoded_pages mm/mmu_gather.c:138 [inline] tlb_batch_pages_flush mm/mmu_gather.c:151 [inline] tlb_flush_mmu_free mm/mmu_gather.c:417 [inline] tlb_flush_mmu+0x6d3/0xa30 mm/mmu_gather.c:424 zap_pte_range mm/memory.c:1957 [inline] zap_pmd_range mm/memory.c:2004 [inline] zap_pud_range mm/memory.c:2032 [inline] zap_p4d_range mm/memory.c:2053 [inline] __zap_vma_range+0x3ea1/0x4bd0 mm/memory.c:2093 unmap_vmas+0x379/0x530 mm/memory.c:2162 exit_mmap+0x280/0x9e0 mm/mmap.c:1300 __mmput+0x118/0x430 kernel/fork.c:1188 exit_mm+0x18e/0x250 kernel/exit.c:581 do_exit+0x8b9/0x2490 kernel/exit.c:962 do_group_exit+0x21b/0x2d0 kernel/exit.c:1116 get_signal+0x1284/0x1330 kernel/signal.c:3036 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:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc2bed9c799 Code: Unable to access opcode bytes at 0x7fc2bed9c76f. RSP: 002b:00007fc2bfcd80e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 00007fc2bf015fa8 RCX: 00007fc2bed9c799 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fc2bf015fac RBP: 00007fc2bf015fa0 R08: 3fffffffffffffff R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc2bf016038 R14: 00007ffece0ab2a0 R15: 00007ffece0ab388 comedi comedi3: fifo overflow ---------------- Code disassembly (best guess): 0: 8b 3d 94 6e 59 0c mov 0xc596e94(%rip),%edi # 0xc596e9a 6: 48 89 de mov %rbx,%rsi 9: 5b pop %rbx a: e9 e3 13 5e 00 jmp 0x5e13f2 f: cc int3 10: cc int3 11: cc int3 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: f3 0f 1e fa endbr64 26: 48 8b 04 24 mov (%rsp),%rax * 2a: 65 48 8b 0d 78 2e 57 mov %gs:0x11572e78(%rip),%rcx # 0x11572eaa <-- trapping instruction 31: 11 32: 65 8b 15 99 2e 57 11 mov %gs:0x11572e99(%rip),%edx # 0x11572ed2 39: 81 e2 00 01 ff 00 and $0xff0100,%edx 3f: 74 .byte 0x74