[PATCH] USB: serial: digi_acceleport: add port lock nesting annotation
From: Johan Hovold
Date: Sat Aug 01 2026 - 09:01:51 EST
The driver takes the driver port lock of both the OOB port and the port
itself when setting the modem control signals, which confuses lockdep.
Mark the OOB port lock as belonging to a separate subclass to suppress
false positive lockdep deadlock warnings.
Reported-by: syzbot+2051460e19471eeb42c3@xxxxxxxxxxxxxxxxxxxxxxxxx
Link: https://lore.kernel.org/all/6a6cd832.1aa927e4.17d4bf.0007.GAE@xxxxxxxxxx/
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
---
drivers/usb/serial/digi_acceleport.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index dea039163661..911d74f20f0e 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -1228,6 +1228,7 @@ static int digi_startup_device(struct usb_serial *serial)
static int digi_port_init(struct usb_serial_port *port, unsigned port_num)
{
+ struct digi_serial *serial_priv = usb_get_serial_data(port->serial);
struct digi_port *priv;
priv = kzalloc_obj(*priv);
@@ -1235,6 +1236,10 @@ static int digi_port_init(struct usb_serial_port *port, unsigned port_num)
return -ENOMEM;
spin_lock_init(&priv->dp_port_lock);
+
+ if (port == serial_priv->ds_oob_port)
+ lockdep_set_subclass(&priv->dp_port_lock, SINGLE_DEPTH_NESTING);
+
priv->dp_port_num = port_num;
init_waitqueue_head(&priv->dp_transmit_idle_wait);
init_waitqueue_head(&priv->dp_flush_wait);
@@ -1279,6 +1284,8 @@ static int digi_startup(struct usb_serial *serial)
serial_priv->ds_oob_port_num = oob_port_num;
serial_priv->ds_oob_port = serial->port[oob_port_num];
+ usb_set_serial_data(serial, serial_priv);
+
ret = digi_port_init(serial_priv->ds_oob_port,
serial_priv->ds_oob_port_num);
if (ret) {
@@ -1286,8 +1293,6 @@ static int digi_startup(struct usb_serial *serial)
return ret;
}
- usb_set_serial_data(serial, serial_priv);
-
return 0;
}
--
2.54.0