From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E946400DE8; Thu, 16 Jul 2026 14:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784211115; cv=none; b=bYR5KK8CDT0WEZqIo46DvPmt602fdXXlD6KIRjxx74hdTsBNmfCGB4n9hTnHaLxZJtpKboTAjQf92UbIxaqSxbM2WKXUEOJTuZ5XXhvm0oHRKYVxNIT1D0Dye//jt0QTOaClXvf2ZvZ5bnultWmvwB1Umq5ESOpulnzPJhw4FN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784211115; c=relaxed/simple; bh=dynrULiBJQ/RqJscYSt9G/TCRrbIWU0y/jl5pFaN5PE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V3L8pvSnWAAPTIgUNlFMHtwOGxsSof4hu/N9TOC4U3PxffgldYQPUXg18QPLzoy6/Y59riVJ3SA842yrpm9N/R2dqNWRUtZnE2+5fG4B+hZgMzIOnz2onT/tfAtT4UJx1hdCqJlA7I74YPG4CpVtiMWEdNfm8td0OehDNq6+QW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=juLpoOtG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="juLpoOtG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FADB1F00A3D; Thu, 16 Jul 2026 14:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784211114; bh=+0EsA2gl77il5aorjL7TlD2kL91VbM1CJ9boGMCRdUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=juLpoOtG9keEriB927+0I73g+9t08zVwzQUQM7f9u/V9tBYI6U09CyhOvRaoYp3Eb DbyZYBZA333lM65nEkjzZItRGKaLMnTV++PvlHlm666DsWrD04d8IAwfvz8/OUbo7L ITFkwoi3uXfpnfiXAAck/koUXCl75hMsdLPcpCfs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johan Hovold Subject: [PATCH 6.18 305/480] USB: serial: digi_acceleport: fix hard lockup on disconnect Date: Thu, 16 Jul 2026 15:30:52 +0200 Message-ID: <20260716133051.418383900@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260716133044.672218725@linuxfoundation.org> References: <20260716133044.672218725@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit 5c1ea24b53bf3bfb859f0a05573997487975da23 upstream. If submitting the OOB write urb fails persistently (e.g if the device is being disconnected) the driver would loop indefinitely with interrupts disabled. Check for urb submission errors when sending OOB commands to avoid hanging if, for example, open(), set_termios() or close() races with a physical disconnect. This is issue was flagged by Sashiko when reviewing an unrelated change to the driver. Link: https://sashiko.dev/#/patchset/20260610132232.356139-1-johan%40kernel.org?part=1 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/digi_acceleport.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -394,12 +394,14 @@ static int digi_write_oob_command(struct len &= ~3; memcpy(oob_port->write_urb->transfer_buffer, buf, len); oob_port->write_urb->transfer_buffer_length = len; + ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC); - if (ret == 0) { - oob_priv->dp_write_urb_in_use = 1; - count -= len; - buf += len; - } + if (ret) + break; + + oob_priv->dp_write_urb_in_use = 1; + count -= len; + buf += len; } spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); if (ret)