Re: [PATCH v5 10/10] can: peak_usb: only dump received bytes on decode error
From: Stéphane Grosjean
Date: Thu Oct 22 2026 - 10:16:25 EST
On 22/10/2026 05:36, netdev-bot+sashiko@xxxxxxxxxx wrote:
[...]
> [Severity: High]
> Does this rate limit cover the FD and Pro adapters?
[...]
> Should the adapter-level dumps and their netdev_err() calls also be rate
> limited? Or could the core dump be skipped for adapters that already
> dump? Either way, each decode error would be dumped at most once and
> always under a rate limit.
Right, the PCAN-USB FD and Pro decoders dump the URB themselves, without
any rate limit. In v6, this patch also removes these two dumps, so that
an undecodable URB is dumped only once, by
peak_usb_read_bulk_callback() and rate limited, and it rate limits the
error messages the decoders print about the received data. The subject
changes accordingly.
> [Severity: Medium]
> This isn't a bug introduced by this patch, but I noticed it in the Pro
> decode path. pcan_usb_pro_decode_buf() in pcan_usb_pro.c reads
> pr->data_type before it checks rec_ptr against msg_end:
Yes, fixed by a new patch in v6, see my reply to patch 8.
Thanks!
Stéphane
pw-bot: cr