[syzbot] [comedi?] inconsistent lock state in waveform_ao_cancel

1 view
Skip to first unread message

syzbot

unread,
Feb 16, 2026, 7:56:25 PM (12 hours ago) Feb 16
to abb...@mev.co.uk, hswe...@visionengravers.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: af98e93c5c39 Add linux-next specific files for 20260212
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14022eef980000
kernel config: https://syzkaller.appspot.com/x/.config?x=61690c38d1398936
dashboard link: https://syzkaller.appspot.com/bug?extid=d9aa9a4d32dc3976468e
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d6acde52048b/disk-af98e93c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea8f872a1b5a/vmlinux-af98e93c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c600c3134b27/bzImage-af98e93c.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+d9aa9a...@syzkaller.appspotmail.com

================================
WARNING: inconsistent lock state
syzkaller #0 Tainted: G L
--------------------------------
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
syz.5.7871/28738 [HC0[0]:SC0[2]:HE1:SE0] takes:
ffff888031d41068 (&dev->spinlock){?...}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:347 [inline]
ffff888031d41068 (&dev->spinlock){?...}-{3:3}, at: waveform_ao_cancel+0x8d/0x120 drivers/comedi/drivers/comedi_test.c:628
{IN-HARDIRQ-W} state was registered at:
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
lock_is_held_type+0x106/0x150 kernel/locking/lockdep.c:5945
lock_is_held include/linux/lockdep.h:249 [inline]
xa_head include/linux/xarray.h:1211 [inline]
xas_start+0x1e8/0x770 lib/xarray.c:191
xas_load+0x2c/0x5b0 lib/xarray.c:239
xa_load+0x118/0x210 lib/xarray.c:1619
kvm_get_memory_attributes include/linux/kvm_host.h:2524 [inline]
hugepage_has_attrs arch/x86/kvm/mmu/mmu.c:7985 [inline]
kvm_mmu_init_memslot_memory_attributes+0x2b0/0x4e0 arch/x86/kvm/mmu/mmu.c:8087
kvm_alloc_memslot_metadata arch/x86/kvm/x86.c:13514 [inline]
kvm_arch_prepare_memory_region+0xbf3/0xee0 arch/x86/kvm/x86.c:13567
kvm_prepare_memory_region virt/kvm/kvm_main.c:1710 [inline]
kvm_set_memslot+0x585/0x1220 virt/kvm/kvm_main.c:1955
kvm_set_memory_region+0x93c/0xb90 virt/kvm/kvm_main.c:2136
kvm_vm_ioctl_set_memory_region+0x6f/0xd0 virt/kvm/kvm_main.c:2170
kvm_vm_ioctl+0xa58/0xd50 virt/kvm/kvm_main.c:5223
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+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
irq event stamp: 1180
hardirqs last enabled at (1179): [<ffffffff8bbb6070>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:178 [inline]
hardirqs last enabled at (1179): [<ffffffff8bbb6070>] _raw_spin_unlock_irqrestore+0x30/0x80 kernel/locking/spinlock.c:194
hardirqs last disabled at (1178): [<ffffffff8bbb5eca>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:130 [inline]
hardirqs last disabled at (1178): [<ffffffff8bbb5eca>] _raw_spin_lock_irqsave+0x1a/0x60 kernel/locking/spinlock.c:162
softirqs last enabled at (572): [<ffffffff816c3c43>] local_bh_disable include/linux/bottom_half.h:20 [inline]
softirqs last enabled at (572): [<ffffffff816c3c43>] fpregs_lock arch/x86/include/asm/fpu/api.h:69 [inline]
softirqs last enabled at (572): [<ffffffff816c3c43>] fpu_clone+0x353/0xbc0 arch/x86/kernel/fpu/core.c:715
softirqs last disabled at (1180): [<ffffffff890eb61d>] spin_lock_bh include/linux/spinlock.h:347 [inline]
softirqs last disabled at (1180): [<ffffffff890eb61d>] waveform_ao_cancel+0x8d/0x120 drivers/comedi/drivers/comedi_test.c:628

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(&dev->spinlock);
<Interrupt>
lock(&dev->spinlock);

*** DEADLOCK ***

1 lock held by syz.5.7871/28738:
#0: ffff888031d410f8 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_close+0x70/0x5e0 drivers/comedi/comedi_fops.c:3029

stack backtrace:
CPU: 1 UID: 0 PID: 28738 Comm: syz.5.7871 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
Call Trace:
<TASK>
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:4662 [inline]
__lock_acquire+0x9d0/0x2cf0 kernel/locking/lockdep.c:5191
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
RIP: 0033:0x7ff21239bf79
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:00007ffdb1e7ffe8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffdb1e800d0 RCX: 00007ff21239bf79
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 000000000010d06d R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b2ef20000 R11: 0000000000000246 R12: 00007ffdb1e80110
R13: 00007ff212615fac R14: 000000000010d0a5 R15: 00007ff212615fa0
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages