Re: [syzbot] [usb?] possible deadlock in digi_set_modem_signals

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.usb.general
Message-ID <[email protected]>

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
0001-usb-serial-digi_accelport-annotate-spinlocks.patch (text/x-patch, 1.1 KB)
From ce3cda5cc4df748600c37b6b5cf5964d21478e1c Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.