mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [syzbot] [comedi?] possible deadlock in comedi_do_insn (2)
@ 2026-07-01 22:14 syzbot
  2026-09-14 19:58 ` syzbot
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2026-07-01 22:14 UTC (permalink / raw)
  To: abbotti, hsweeten, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    780d569e6c4b Merge tag 'pwm/for-7.2-rc1-2' of git://git.ke..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=131b4176580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=f9bf5d2bfae96234
dashboard link: https://syzkaller.appspot.com/bug?extid=acd959f649966559199c
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44

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

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-780d569e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/944d8beefedc/vmlinux-780d569e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/615f6b8a2abd/bzImage-780d569e.xz

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

============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.4.6324/17474 is trying to acquire lock:
ffff88803435a0f0 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_do_insn+0x2e/0x360 drivers/comedi/kcomedilib/kcomedilib_main.c:183

but task is already holding lock:
ffff88803435c8f0 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_unlocked_ioctl+0x180/0x3310 drivers/comedi/comedi_fops.c:2290

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

       CPU0
       ----
  lock(&dev->mutex#4);
  lock(&dev->mutex#4);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by syz.4.6324/17474:
 #0: ffff88803435c8f0 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_unlocked_ioctl+0x180/0x3310 drivers/comedi/comedi_fops.c:2290

stack backtrace:
CPU: 2 UID: 0 PID: 17474 Comm: syz.4.6324 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_deadlock_bug.cold+0xbd/0xca kernel/locking/lockdep.c:3041
 check_deadlock kernel/locking/lockdep.c:3093 [inline]
 validate_chain kernel/locking/lockdep.c:3895 [inline]
 __lock_acquire+0x1256/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 __mutex_lock_common kernel/locking/mutex.c:646 [inline]
 __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
 comedi_do_insn+0x2e/0x360 drivers/comedi/kcomedilib/kcomedilib_main.c:183
 comedi_dio_bitfield2+0x3c0/0x420 drivers/comedi/kcomedilib/kcomedilib_main.c:314
 bonding_dio_insn_bits+0x2b9/0x570 drivers/comedi/drivers/comedi_bond.c:100
 insn_rw_emulate_bits+0x2a2/0x5e0 drivers/comedi/drivers.c:703
 parse_insn+0x83f/0x19f0 drivers/comedi/comedi_fops.c:1565
 do_insn_ioctl+0x152/0x4e0 drivers/comedi/comedi_fops.c:1790
 comedi_unlocked_ioctl+0xf68/0x3310 drivers/comedi/comedi_fops.c:2422
 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+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9a0d59ce59
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:00007f9a0e40e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9a0d815fa0 RCX: 00007f9a0d59ce59
RDX: 0000200000000000 RSI: 000000008028640c RDI: 0000000000000003
RBP: 00007f9a0d632e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9a0d816038 R14: 00007f9a0d815fa0 R15: 00007fff138218d8
 </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 syzkaller@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [syzbot] [comedi?] possible deadlock in comedi_do_insn (2)
  2026-07-01 22:14 [syzbot] [comedi?] possible deadlock in comedi_do_insn (2) syzbot
@ 2026-09-14 19:58 ` syzbot
  0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2026-09-14 19:58 UTC (permalink / raw)
  To: abbotti, hsweeten, linux-kernel, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    704340f1cd0d Merge tag 'x86_urgent_for_7.3-rc4' of git://g..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=165c9901580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8c5c3949d762a91f
dashboard link: https://syzkaller.appspot.com/bug?extid=acd959f649966559199c
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12aa2471580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15f26601580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-704340f1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e02afc1c5927/vmlinux-704340f1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/09cb4a8b3309/bzImage-704340f1.xz

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

comedi comedi0: comedi_test: 1000000 microvolt, 100000 microsecond waveform attached
comedi comedi1: comedi_bond: 0:2  attached, 32 channels from 1 devices
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.17/5908 is trying to acquire lock:
ffff8880339978f0 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_do_insn+0x2e/0x360 drivers/comedi/kcomedilib/kcomedilib_main.c:183

but task is already holding lock:
ffff8880339970f0 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_unlocked_ioctl+0x180/0x3310 drivers/comedi/comedi_fops.c:2290

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

       CPU0
       ----
  lock(&dev->mutex#4);
  lock(&dev->mutex#4);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

locks held by syz.0.17/5908: 1, last CPU#1:
 #0: ffff8880339970f0 (&dev->mutex#4){+.+.}-{4:4}, at: comedi_unlocked_ioctl+0x180/0x3310 drivers/comedi/comedi_fops.c:2290

stack backtrace:
CPU: 1 UID: 0 PID: 5908 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_deadlock_bug.cold+0xbd/0xca kernel/locking/lockdep.c:3085
 check_deadlock kernel/locking/lockdep.c:3137 [inline]
 validate_chain kernel/locking/lockdep.c:3939 [inline]
 __lock_acquire+0x13f4/0x1f40 kernel/locking/lockdep.c:5288
 lock_acquire kernel/locking/lockdep.c:5942 [inline]
 lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
 __mutex_lock_common kernel/locking/mutex.c:646 [inline]
 __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
 comedi_do_insn+0x2e/0x360 drivers/comedi/kcomedilib/kcomedilib_main.c:183
 comedi_dio_bitfield2+0x3c0/0x420 drivers/comedi/kcomedilib/kcomedilib_main.c:314
 bonding_dio_insn_bits+0x2b9/0x570 drivers/comedi/drivers/comedi_bond.c:100
 parse_insn+0x1326/0x19f0 drivers/comedi/comedi_fops.c:1613
 do_insn_ioctl+0x152/0x4e0 drivers/comedi/comedi_fops.c:1790
 comedi_unlocked_ioctl+0xf68/0x3310 drivers/comedi/comedi_fops.c:2422
 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:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9368f9e159
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:00007ffcaf8c9638 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9369225fa0 RCX: 00007f9368f9e159
RDX: 0000200000000400 RSI: 000000008028640c RDI: 0000000000000004
RBP: 00007f936903503b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9369225fac R14: 00007f9369225fa0 R15: 00007f9369225fa0
 </TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-14 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-01 22:14 [syzbot] [comedi?] possible deadlock in comedi_do_insn (2) syzbot
2026-09-14 19:58 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®