================================ WARNING: inconsistent lock state syzkaller #0 Tainted: G L -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.9.24341/9322 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888031507068 (&dev->spinlock){?...}-{3:3}, at: spin_lock include/linux/spinlock.h:341 [inline] ffff888031507068 (&dev->spinlock){?...}-{3:3}, at: das16m1_interrupt+0x5e/0x180 drivers/comedi/drivers/das16m1.c:460 {HARDIRQ-ON-W} state was registered at: lock_acquire+0xf0/0x2e0 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:178 spin_lock_bh include/linux/spinlock.h:347 [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/0xa70 fs/file_table.c:469 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: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+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 444 hardirqs last enabled at (443): [] irqentry_exit+0x59e/0x620 kernel/entry/common.c:242 hardirqs last disabled at (444): [] common_interrupt+0x13/0xe0 arch/x86/kernel/irq.c:326 softirqs last enabled at (408): [] __do_softirq kernel/softirq.c:660 [inline] softirqs last enabled at (408): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last enabled at (408): [] __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:727 softirqs last disabled at (265): [] __do_softirq kernel/softirq.c:660 [inline] softirqs last disabled at (265): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last disabled at (265): [] __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:727 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.9.24341/9322: #0: ffff88807bc8d900 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:592 [inline] #0: ffff88807bc8d900 (&mm->mmap_lock){++++}-{4:4}, at: __mm_populate+0x182/0x390 mm/gup.c:1942 #1: ffffffff8e9602e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:312 [inline] #1: ffffffff8e9602e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:850 [inline] #1: ffffffff8e9602e0 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x29/0x240 mm/pgtable-generic.c:288 stack backtrace: CPU: 0 UID: 0 PID: 9322 Comm: syz.9.24341 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+0xf0/0x2e0 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:154 spin_lock include/linux/spinlock.h:341 [inline] das16m1_interrupt+0x5e/0x180 drivers/comedi/drivers/das16m1.c:460 __handle_irq_event_percpu+0x227/0x9e0 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/0xa10 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:check_preemption_disabled+0x1d/0xe0 lib/smp_processor_id.c:53 Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 55 41 57 41 56 53 65 8b 05 57 13 87 07 65 8b 0d 4c 13 87 07 f7 c1 ff ff ff 7f 74 0c 5b <41> 5e 41 5f 5d c3 cc cc cc cc cc 9c 59 f7 c1 00 02 00 00 74 ea 65 RSP: 0018:ffffc90003a17688 EFLAGS: 00000202 RAX: 0000000000000000 RBX: ffff8880b0d46660 RCX: 0000000080000002 RDX: 0000000000000000 RSI: ffffffff8c2a0ae0 RDI: ffffffff8c2a0aa0 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: ffffc90003a17a0c R11: fffff52000742f4a R12: 0000000000000000 R13: ffff8880b0d46678 R14: 0000000000000000 R15: 0000000000000001 rcu_is_watching_curr_cpu include/linux/context_tracking.h:128 [inline] rcu_is_watching+0x15/0xb0 kernel/rcu/tree.c:752 trace_lock_acquire include/trace/events/lock.h:24 [inline] lock_acquire+0x57/0x2e0 kernel/locking/lockdep.c:5831 __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] pte_offset_map_lock+0x13d/0x210 mm/pgtable-generic.c:402 do_anonymous_page mm/memory.c:5242 [inline] do_pte_missing+0x9df/0x3750 mm/memory.c:4475 handle_pte_fault mm/memory.c:6317 [inline] __handle_mm_fault mm/memory.c:6455 [inline] handle_mm_fault+0x1bec/0x3310 mm/memory.c:6624 faultin_page mm/gup.c:1126 [inline] __get_user_pages+0x165b/0x29d0 mm/gup.c:1428 populate_vma_page_range+0x2be/0x3c0 mm/gup.c:1860 __mm_populate+0x25f/0x390 mm/gup.c:1963 mm_populate include/linux/mm.h:3899 [inline] vm_mmap_pgoff+0x3aa/0x4f0 mm/util.c:586 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7efd85b9c629 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:00007efd86a24028 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007efd85e15fa0 RCX: 00007efd85b9c629 RDX: 0000000003000004 RSI: 0000000000c00000 RDI: 0000200000001000 RBP: 00007efd85c32b39 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000003032 R11: 0000000000000246 R12: 0000000000000000 R13: 00007efd85e16038 R14: 00007efd85e15fa0 R15: 00007ffd07299458 comedi comedi3: fifo overflow ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 55 push %rbp e: 41 57 push %r15 10: 41 56 push %r14 12: 53 push %rbx 13: 65 8b 05 57 13 87 07 mov %gs:0x7871357(%rip),%eax # 0x7871371 1a: 65 8b 0d 4c 13 87 07 mov %gs:0x787134c(%rip),%ecx # 0x787136d 21: f7 c1 ff ff ff 7f test $0x7fffffff,%ecx 27: 74 0c je 0x35 29: 5b pop %rbx * 2a: 41 5e pop %r14 <-- trapping instruction 2c: 41 5f pop %r15 2e: 5d pop %rbp 2f: c3 ret 30: cc int3 31: cc int3 32: cc int3 33: cc int3 34: cc int3 35: 9c pushf 36: 59 pop %rcx 37: f7 c1 00 02 00 00 test $0x200,%ecx 3d: 74 ea je 0x29 3f: 65 gs