Re: [PATCH net] can: peak_usb: accept short uCAN end-of-list records
From: Marc Kleine-Budde
Date: Wed Oct 21 2026 - 10:38:13 EST
On 21.10.2026 12:20:29, Stéphane Grosjean wrote:
> On 19.10.2026 00:46:34, Liu Changjie wrote:
> > A PCAN-USB FD v2 running firmware 3.2.0 sends a 16-byte status
> > record followed by a four-byte zero-size end marker. These transfers
> > cause repeated receive-buffer dumps while the interface is up.
> >
> > pcan_usb_fd_decode_buf() requires a complete 12-byte struct pucan_msg
> > before checking the size field, so it rejects the end marker with
> > -EBADMSG.
>
> Right: the firmware may terminate a list of records with a short null
> record, and it doesn't need to be a full struct pucan_msg. Only its size
> field matters.
Thanks.
> The patch keeps all the record length checks added by 93fcab2c6968 and
> only accepts the end marker earlier, so:
>
> Reviewed-by: Stéphane Grosjean <s.grosjean@xxxxxxxxxxxxxx>
>
> Marc, since 93fcab2c6968 has been backported to the 6.6, 6.12 and 7.1
> stable trees, could you add "Cc: stable@xxxxxxxxxxxxxxx" when applying?
Done.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature