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 68B082F1FDF; Fri, 7 Aug 2026 15:11:37 +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=1786115500; cv=none; b=VsrwJjDMQCAfPYJyzuKb8/8tUZnokHouQ9VfnH9Lb2MSzSfOI/+1kH+CeMCqdO3CM2hMbLtQuD05/TcXcYcfgHcYsp8hVK4PCHZn+uxF9ZWSngrqDP3fiRh6vAVSqodG+S4Q/mBwyKcTBcjD5ODyZ9WIc0EIM/sS1gq5bh7JGzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786115500; c=relaxed/simple; bh=aGIiUZiUzi0pb+iPTnW0nswuKszlVdrIOlEv7boJXRA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZlysHZe0BA7U2++J/B1EfL4BqvulOb2ixDXkZpa/gzUGnbkIU+xgLa2jzi2AFcOCvWvwALZV5Ko3YD8bOZOMRQf9AdVs4kdwLA6hDFmtqQGK7fnQAXcGEsIp+fg1n6KYuwdFrUrtAyajNkt6snxunDLAUpSsufMrLtKNOQM20vg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GPJ0hx1N; 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="GPJ0hx1N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BD871F00A3D; Fri, 7 Aug 2026 15:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786115497; bh=A2+Kae3+m48t7eszQudwPoWNuijAwJb/ATABAtT0RWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GPJ0hx1NkwVWBhY6KwMO8zeYVa2UGs7jIQfuPJvlzZVfdkuWntrPiGtWw5azc1pos VyYw0+FPEEFdLt3JXKPjjCpyxMNiFJe4hWx2T6i4Gt80ofTIUnjhFBWHvi+I89MR3w e+uLxNfe7jk/i0N2Zqr9f1bhlNH8QUfKufxBCtjA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable@kernel.org, Marc Kleine-Budde Subject: [PATCH 6.18 298/396] can: gs_usb: gs_usb_receive_bulk_callback(): resubmit URB on skb allocation failure Date: Fri, 7 Aug 2026 16:37:38 +0200 Message-ID: <20260807143430.698486894@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143424.272339768@linuxfoundation.org> References: <20260807143424.272339768@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: Marc Kleine-Budde commit 68c5724ecd159992f76edb7b57dc508a44c8b7da upstream. If the allocation of the SKB in gs_usb_receive_bulk_callback() fails, the driver returns from the callback without resubmitting the URB in order to receive further USB in URBs. This results in a silent performance degradation which, if it occurs repeatedly, results in starvation of USB in traffic. Instead of returning immediately, try to resend the URB. If this also fails, this is logged as an info message. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Fixes: 26949ac935e3 ("can: gs_usb: add CAN-FD support") Link: https://patch.msgid.link/20260709-gs_usb-resubmit-urb-v1-1-4dd40030cc84@pengutronix.de Cc: stable@kernel.org Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/gs_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -674,7 +674,7 @@ static void gs_usb_receive_bulk_callback if (hf->flags & GS_CAN_FLAG_FD) { skb = alloc_canfd_skb(netdev, &cfd); if (!skb) - return; + goto resubmit_urb; cfd->can_id = le32_to_cpu(hf->can_id); cfd->len = data_length; @@ -687,7 +687,7 @@ static void gs_usb_receive_bulk_callback } else { skb = alloc_can_skb(netdev, &cf); if (!skb) - return; + goto resubmit_urb; cf->can_id = le32_to_cpu(hf->can_id); can_frame_set_cc_len(cf, hf->can_dlc, dev->can.ctrlmode);