mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+acd959f649966559199c@syzkaller.appspotmail.com>
To: abbotti@mev.co.uk, hsweeten@visionengravers.com,
	 linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [comedi?] possible deadlock in comedi_do_insn (2)
Date: Mon, 14 Sep 2026 12:58:35 -0700	[thread overview]
Message-ID: <6aa851eb.4c28b7d0.c1bba.001f.GAE@google.com> (raw)
In-Reply-To: <6a459145.52c20a74.1f8b39.0005.GAE@google.com>

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.

      reply	other threads:[~2026-09-14 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 22:14 syzbot
2026-09-14 19:58 ` syzbot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6aa851eb.4c28b7d0.c1bba.001f.GAE@google.com \
    --to=syzbot+acd959f649966559199c@syzkaller.appspotmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®