* Re: [PATCH net-next 8/9] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info messages
[not found] <20261130092003.1946901-9-mkl@pengutronix.de>
@ 2026-12-01 9:41 ` netdev-bot+sashiko
0 siblings, 0 replies; only message in thread
From: netdev-bot+sashiko @ 2026-12-01 9:41 UTC (permalink / raw)
To: mkl
Cc: netdev, davem, kuba, linux-can, kernel, shuangpeng.kernel, stable,
vadim.fedorenko
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-01 9:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261130092003.1946901-9-mkl@pengutronix.de>
2026-12-01 9:41 ` [PATCH net-next 8/9] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info messages netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox