Article View: linux.kernel.netdev
Article #25136Re: [PATCH net-next 8/9] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info message...
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 09:41
Date: Tue, 01 Dec 2026 09:41
74 lines
10632 bytes
10632 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit "can: gs_usb: gs_usb_receive_bulk_callback(): use
dev_info_ratelimited() to print re-submit info messages" fixes aโฆ
--
can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info messages
When re-submitting the IN URB fails in gs_usb_receive_bulk_callback(),
the message is now printed with dev_info_ratelimited() on the USB device.
It used to go through net_ratelimit() and netdev_info(). This avoids
logging against a NULL net_device when the URB is resubmitted before the
netdev is known, and it drops the NULL initialization of netdev.
Link: https://patch.msgid.link/20261130-gs_usb-fixes-v12-8-9ba1f84c179a@pengutronix.de
> diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
> index 2b23246fb8ebd..10769296c6e0b 100644
> --- a/drivers/net/can/usb/gs_usb.c
> +++ b/drivers/net/can/usb/gs_usb.c
[ ... ]
> @@ -797,9 +797,10 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
> if (parent->canch[rc])
> netif_device_detach(parent->canch[rc]->netdev);
> }
> - } else if (rc != -ESHUTDOWN && net_ratelimit()) {
> - netdev_info(netdev, "failed to re-submit IN URB: %pe\n",
> - ERR_PTR(rc));
> + } else if (rc != -ESHUTDOWN) {
> + dev_info_ratelimited(&parent->udev->dev,
> + "failed to re-submit IN URB: %pe\n",
> + ERR_PTR(rc));
> }
> }
[Severity: Low]
This patch fixes a reported problem and has Reported-by: and Closes:
tags, but it has no Fixes: tag. Should one be added?
The NULL netdev case comes from the early header length check in
gs_usb_receive_bulk_callback(), which commit 6fe9f3279f7d added:
minimum_length = sizeof(hf->header);
if (urb->actual_length < minimum_length) {
dev_err_ratelimited(&parent->udev->dev,
"short read (actual_length=%u, minimum_length=%u)\n",
urb->actual_length, minimum_length);
goto resubmit_urb;
}
This goto reaches resubmit_urb before netdev = dev->netdev runs. If
usb_submit_urb() then fails with an error other than -ENODEV or
-ESHUTDOWN, the old netdev_info() call logged "(NULL net_device)".
Before 6fe9f3279f7d, every goto resubmit_urb ran after netdev was
assigned.
Commit 6fe9f3279f7d has its own Fixes: tag, so stable trees may pick it
up. Without a Fixes: tag here, those trees could miss this follow-up.
Would this tag fit?
Fixes: 6fe9f3279f7d ("can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length before accessing header")
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130092003.1946901-2-mkl%40pengutronix.de
Technical Details
Message-ID:
<179611809021.3146.12955719357828172247@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374909-linux-kernel-netdev=dewy.ruReferences:
<20261130092003.1946901-9-mkl@pengutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374909-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 8/9] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info messages Date: Tue, 01 Dec 2026 09:41:30 +0000 Organization: Usenet Network Message-ID: <179611809021.3146.12955719357828172247@kernel.org> References: <20261130092003.1946901-9-mkl@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1675976"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Jj45c5lbM6OfNyp1/s/3ddwXFX8= sha256:Y4yhj5+Ymfbox5p+jyuKGKqeyMMurs74PSuwI3VE0lc= sha1:yZM/V0pVVHAlg0R7kndH6rpodtI= sha256:FNbU+IkcRabdX8QY83xIY1H901LK6iXh0fzyLcLCclw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 9ED1511730B; Tue, 1 Dec 2026 12:41:54 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XcEnIx_jcMbR; Tue, 1 Dec 2026 12:41:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374909-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 89827117307; Tue, 1 Dec 2026 12:41:42 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 1425F32CDE; Tue, 1 Dec 2026 09:41:33 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796118092; b=Ug+la7TyRWtv9lZ0/wvP4rgtVXTl7ataFud5d9FGWtL3kD7IpaI2PJlSOFjQ+0DEM56j myljeu8l4iHxhiBkAw43GoLA/jfC4dhtFVehMZAgJ6arlMfcUWnWWlhQCxEIpiihNxVV5 7R0FSOMuRlWHu4bn1rcLZykoNOu3/4agoDDAynMAbFwzCeEoQcC3G5IlFHm/KXdyG4Top t0DLJfhGIp/l14fX7Cm/0hc0dFvxlWl/+sOOJYRXm6lPP4tp+XTIClK9A2dl391vQPrBT wFXUaN1VI9KJsmjS8tFBP3JY4X4Ya94yEmmstxtYm8Bc8mQL+oQdm0Qkrw523qyxlvw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796118092; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=7Tmq97lcEWKAGzzDmW9NdzRYWi0Vm/TBr9TXM6U9nTU=; b=SY7oyRmAnF1Legues6FUVt/kOyCzueQhcPVZBe2AoOIIFux5LVCKApxjkTVk7G0HKTRJ 8gEXXoy6XQZBMCZcgzS2iMKlczEGGj8iBUPZLkZnZDwanmxD29fhwydsCk/7V6HdzdyA6 F/mSPmbD2tuGX3RAhmIAqdFoCGIpoe4Zm3RYWupWlhQBNHe6VF9FHxpYK2eOJHwsf+v0O +w6CECr5fZKdXtC9qbe4Bzq3f+W4B1iI6JiCWgkEM8Wnj3NbOnE8mz1ALhdxMh0n4tRGf O8UjPblLDrlCd2TkqBsfVHqzhjAAvaHHMpYAz+18B6qN7Wu6U4ykjsykn5wZTmiYEaA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LusXzd0R; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B69F9606A31A; Tue, 1 Dec 2026 09:41:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LusXzd0R X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796118091; b=j3FWQeh+qs7yA87N4kOVKSsFNtZuqPrJUddVz7hY9dG5PXxcfXO7IHq5cHYaG424alJI boGF5Su7EJx/ScErq8XEFX5TRAmc2qlBJ6Tu8VqoOppPIdyFgFUJ3sI0D1alIAUQV+tLB aaNw+dC3EjmBSIMu/djLc2e/Uo5MB/BFXs6AGlGPBvXnwX9k3GOSQIuj/+yuIdYHAyF1G BiBEops2J+/yOQzqmu8TzQIIIOTLbbn4IgasPN1EQfC/fHX/cAYKm+6txA940sBMVg5wS RojqdfZNgT2q1DXlUHPd3oxIYScaoq9ZaCYfz8ECJizvMys1fx2sa5TNPVo+acY53sg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796118091; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=7Tmq97lcEWKAGzzDmW9NdzRYWi0Vm/TBr9TXM6U9nTU=; b=Ub1WGdoYEapkbdK0lffPVIpcudyLniQixYCUyYGy+fbCqzmhj6ayby2or3QTzYxy4w84 TsHrnyXDbMYPKLPWwyrmMmJARBSP5ngaQ8HiB8xBKObJRl1JL0C9uIIDAvJkldbv24EPO qqkIV0gDL6UjLSOWWq4CuXXw6d0pyxst3HRSLJf4qwJhuLnRSK4V4d4DX/XHx60bIzo1F iWAYg0B8c5ViH8n/2EkAJjI00zoThrv4lusu4F3VxqsoALUxdklWl9OQ1fhix649Ki9oP tg8k8tqJpvJcf8zIHOz8A13eGUfCL0A50oc905cv0VLeXUW9TGQ3E1iVLlI2RwlSBYA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LusXzd0R; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D73F4606A325; Tue, 1 Dec 2026 09:41:31 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4B861F00897; Tue, 1 Dec 2026 09:41:30 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796118091; bh=7Tmq97lcEWKAGzzDmW9NdzRYWi0Vm/TBr9TXM6U9nTU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=LusXzd0RYcUQv41KhxKfNFlfp5xn2fJEWwAyhhb4gQi7r6s+oOWmlDoTa3yXG5QTZ 2EuVQj4c/tYKV0HcdcjceOcQqku7Pc6F2cutQZCkybWDCQz5Vem0oi7sGRYOYN0GHR mslEqFimvvwuDkQ6T4Ei50XWOLZwF/gnK5S2giLLMGr7zfnBkMUhsNI/wInMTzaqpN g9UDFrP+NUAImymIXVilHFGbEQ5TcEelzi9vVpPOwl5Bbp0ZrDWMxZhAL08vsyDlKD vNYukd2BojPtAte+ft+9P7wNB2yd7Rh0sYVSTxagYoUiIrqSrZH/mcxljlG5NfN736 O2eCXjKdNAtig== X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org, kernel@pengutronix.de, shuangpeng.kernel@gmail.com, stable@vger.kernel.org, vadim.fedorenko@linux.dev X-In-Reply-To: <20261130092003.1946901-9-mkl@pengutronix.de> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list