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 26E69293458; Fri, 7 Aug 2026 14:52:20 +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=1786114341; cv=none; b=nLRxxy+CrvqZjzKFHdLrD+KGzlP0y8hS3ayxXCdZXrrb5Uz7Mrz517OGqmymE1D/A+oC+/YikNAiQjpKDczkP0LX/nkMjFO6r13ZRqcBF2eIJIM6U+FBVjcBdEmDTbd4/S7bZAjsYly3r66/vo+2aUFmhU0uxhzJbjF+Cg0o3XE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786114341; c=relaxed/simple; bh=adW44iWiD6VGw33EkzA2GvL/92gu7STgO71/bYQSz4o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nrvYjrpwlaXd25dXiCWQKV4A2WL42q2Jvx7rYNnXMa4vgmz3YojpppKQ3nTFcD2iyucJx/7cvs2H+7Wg0nNmiIbA2zWi11cwVXW59KP9E/TvM6+tHdsXOBUjmTPyxoa0uAjJzqbSPF/kSISsM1QFq66mUUiT7mK5fHpcpdNPugU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1ePf9Q19; 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="1ePf9Q19" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A4DE1F000E9; Fri, 7 Aug 2026 14:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786114339; bh=dRPpHtj11H6cE+r+EjM0dlyL1fYWkGoZVYAQ2y0/fp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1ePf9Q19zH+lPo91X3OTza3R6eoxe7+aVOUvr1K2K1GpRWzuZ0RfIB67F4kpMtes8 sUr1HV3Jxt8jlnOoWP6XIBk+c6ZYeUsXDiHRs0sV4ddMyTnmIx6ROOYwhEqyw7a3AC RvkvFpq1ASek/ZcdWv73qxtrWEaLXqJLd49C+SU8= 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.12 230/337] can: gs_usb: gs_usb_receive_bulk_callback(): resubmit URB on skb allocation failure Date: Fri, 7 Aug 2026 16:37:13 +0200 Message-ID: <20260807143423.539021729@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143418.516897842@linuxfoundation.org> References: <20260807143418.516897842@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.12-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 @@ -671,7 +671,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; @@ -684,7 +684,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);