# Re: \[PATCH v5 3/5\] can: do not copy the payload of RTR frames

- From: Marc Kleine-Budde \<mkl@pengutronix.de\>
- Date: 2021-12-10 07:36:01 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/12/1603476
- Thread: https://ratatoskr.run/linux-can/2021/12/1599647/t.md

```text
On 07.12.2021 21:15:29, Vincent Mailhol wrote:
> The actual payload length of the CAN Remote Transmission Request (RTR)
> frames is always 0, i.e. nothing is transmitted on the wire. However,
                           ^^^^^^^
I've changed this to "no payload" to make it more unambiguous.

> those RTR frames still use the DLC to indicate the length of the
> requested frame.
> 
> For this reason, it is incorrect to copy the payload of RTR frames
> (the payload buffer would only contain garbage data). This patch
> encapsulates the payload copy in a check toward the RTR flag.
> 
> CC: Yasushi SHOJI <yashi@spacecubics.com>
> Signed-off-by: Vincent Mailhol <redacted>

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |
```

## Attachments

- [signature.asc](https://ratatoskr.run/netdev/2021/12/1603476/attachment/0) (application/pgp-signature, 488 bytes)
