Linux USB
 help / color / mirror / Atom feed
* [syzbot] [usb?] possible deadlock in digi_set_modem_signals
@ 2026-07-31 17:15 syzbot
  2026-08-04 13:41 ` Oliver Neukum
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2026-07-31 17:15 UTC (permalink / raw)
  To: gregkh, johan, linux-kernel, linux-usb, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    11028ab62899 Merge tag 'probes-fixes-v7.2-rc5' of git://gi..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=13574aea580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=cb17729fb04b1e3a
dashboard link: https://syzkaller.appspot.com/bug?extid=2051460e19471eeb42c3
compiler:       Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16643632580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1535b03e580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0afad3dd27f4/disk-11028ab6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2e1441f9c31d/vmlinux-11028ab6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5f0b8bdf00cd/bzImage-11028ab6.xz

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

============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz-executor164/5616 is trying to acquire lock:
ffff888037675858 (&priv->dp_port_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
ffff888037675858 (&priv->dp_port_lock){+.+.}-{3:3}, at: digi_set_modem_signals+0x19d/0x8c0 drivers/usb/serial/digi_acceleport.c:525

but task is already holding lock:
ffff888037676058 (&priv->dp_port_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
ffff888037676058 (&priv->dp_port_lock){+.+.}-{3:3}, at: digi_set_modem_signals+0x195/0x8c0 drivers/usb/serial/digi_acceleport.c:524

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

       CPU0
       ----
  lock(&priv->dp_port_lock);
  lock(&priv->dp_port_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

3 locks held by syz-executor164/5616:
 #0: ffff8880379d71a0 (&tty->legacy_mutex){+.+.}-{4:4}, at: tty_init_dev+0x74/0x4d0 drivers/tty/tty_io.c:1406
 #1: ffff888037676058 (&priv->dp_port_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
 #1: ffff888037676058 (&priv->dp_port_lock){+.+.}-{3:3}, at: digi_set_modem_signals+0x195/0x8c0 drivers/usb/serial/digi_acceleport.c:524
 #2: ffffffff8e1c3000 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
 #2: ffffffff8e1c3000 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
 #2: ffffffff8e1c3000 (rcu_read_lock){....}-{1:3}, at: __rt_spin_lock kernel/locking/spinlock_rt.c:50 [inline]
 #2: ffffffff8e1c3000 (rcu_read_lock){....}-{1:3}, at: rt_spin_lock+0x1e0/0x400 kernel/locking/spinlock_rt.c:57

stack backtrace:
CPU: 0 UID: 0 PID: 5616 Comm: syz-executor164 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041
 check_deadlock kernel/locking/lockdep.c:3093 [inline]
 validate_chain kernel/locking/lockdep.c:3895 [inline]
 __lock_acquire+0x24df/0x2ce0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 rt_spin_lock+0x83/0x400 kernel/locking/spinlock_rt.c:56
 spin_lock include/linux/spinlock_rt.h:45 [inline]
 digi_set_modem_signals+0x19d/0x8c0 drivers/usb/serial/digi_acceleport.c:525
 tty_port_raise_dtr_rts drivers/tty/tty_port.c:456 [inline]
 tty_port_block_til_ready+0x386/0x890 drivers/tty/tty_port.c:540
 tty_open+0x496/0xcd0 drivers/tty/tty_io.c:2137
 chrdev_open+0x4dc/0x600 fs/char_dev.c:411
 do_dentry_open+0x849/0x1420 fs/open.c:947
 vfs_open+0x3b/0x350 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e60/0x3850 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2dafacdfc9
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe4d880a08 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000200000000400 RCX: 00007f2dafacdfc9
RDX: 000000000000e002 RSI: 0000200000000400 RDI: 00000000ffffff9c
RBP: 0000200000000408 R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe4d880b78
R13: 431bde82d7b634db R14: 00007f2dafb61c40 R15: 0000000000000002
 </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 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.

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] 4+ messages in thread

* Re: [syzbot] [usb?] possible deadlock in digi_set_modem_signals
  2026-07-31 17:15 [syzbot] [usb?] possible deadlock in digi_set_modem_signals syzbot
@ 2026-08-04 13:41 ` Oliver Neukum
  2026-08-04 14:39   ` Johan Hovold
  2026-08-04 15:20   ` syzbot
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Neukum @ 2026-08-04 13:41 UTC (permalink / raw)
  To: syzbot, gregkh, johan, linux-kernel, linux-usb, syzkaller-bugs

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]



On 31.07.26 19:15, syzbot wrote:
> If you want syzbot to run the reproducer, reply with:

#syz test: git://repo/address.git 11028ab62899


[-- Attachment #2: 0001-usb-serial-digi_accelport-annotate-spinlocks.patch --]
[-- Type: text/x-patch, Size: 1115 bytes --]

From ce3cda5cc4df748600c37b6b5cf5964d21478e1c Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Tue, 4 Aug 2026 11:38:30 +0200
Subject: [PATCH 1/2] usb: serial: digi_accelport: annotate spinlocks

The driver holds two spinlocks at the same time.
This is perfectly safe, but confuses the validator.
Tell it manually that we know what we are doing.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/usb/serial/digi_acceleport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index dea039163661..a687217eadd7 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -522,7 +522,7 @@ static int digi_set_modem_signals(struct usb_serial_port *port,
 		port_priv->dp_port_num, modem_signals);
 
 	spin_lock_irqsave(&oob_priv->dp_port_lock, flags);
-	spin_lock(&port_priv->dp_port_lock);
+	spin_lock_nested(&port_priv->dp_port_lock, SINGLE_DEPTH_NESTING);
 
 	while (oob_priv->dp_write_urb_in_use) {
 		spin_unlock(&port_priv->dp_port_lock);
-- 
2.55.0


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

* Re: [syzbot] [usb?] possible deadlock in digi_set_modem_signals
  2026-08-04 13:41 ` Oliver Neukum
@ 2026-08-04 14:39   ` Johan Hovold
  2026-08-04 15:20   ` syzbot
  1 sibling, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2026-08-04 14:39 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: syzbot, gregkh, linux-kernel, linux-usb, syzkaller-bugs

On Tue, Aug 04, 2026 at 03:41:59PM +0200, Oliver Neukum wrote:
> 
> 
> On 31.07.26 19:15, syzbot wrote:
> > If you want syzbot to run the reproducer, reply with:
> 
> #syz test: git://repo/address.git 11028ab62899
> 

> From ce3cda5cc4df748600c37b6b5cf5964d21478e1c Mon Sep 17 00:00:00 2001
> From: Oliver Neukum <oneukum@suse.com>
> Date: Tue, 4 Aug 2026 11:38:30 +0200
> Subject: [PATCH 1/2] usb: serial: digi_accelport: annotate spinlocks
> 
> The driver holds two spinlocks at the same time.
> This is perfectly safe, but confuses the validator.
> Tell it manually that we know what we are doing.

I fixed this up a few days ago after I saw the report:

	https://lore.kernel.org/all/20260801125827.292983-1-johan@kernel.org/

I've merged that patch for 7.2 to avoid others spending time on it, but
perhaps I should have replied to the report as well. Sorry about that.

Johan

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

* Re: [syzbot] [usb?] possible deadlock in digi_set_modem_signals
  2026-08-04 13:41 ` Oliver Neukum
  2026-08-04 14:39   ` Johan Hovold
@ 2026-08-04 15:20   ` syzbot
  1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2026-08-04 15:20 UTC (permalink / raw)
  To: gregkh, johan, linux-kernel, linux-usb, oneukum, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo git://repo/address.git on commit 11028ab62899: failed to run ["git" "-c" "core.hooksPath=/dev/null" "fetch" "--force" "--tags" "b7cf8f2fbfc36c709a08e0b9c77990e491473738"]: exit status 128


Tested on:

commit:         [unknown 
git tree:       git://repo/address.git 11028ab62899
kernel config:  https://syzkaller.appspot.com/x/.config?x=cb17729fb04b1e3a
dashboard link: https://syzkaller.appspot.com/bug?extid=2051460e19471eeb42c3
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=15fd8bb9580000


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

end of thread, other threads:[~2026-08-04 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 17:15 [syzbot] [usb?] possible deadlock in digi_set_modem_signals syzbot
2026-08-04 13:41 ` Oliver Neukum
2026-08-04 14:39   ` Johan Hovold
2026-08-04 15:20   ` syzbot

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