Thread (11 messages) 11 messages, 4 authors, 2021-12-10

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

From: Yasushi SHOJI <yashi@spacecubics.com>
Date: 2021-12-10 08:57:49
Also in: linux-can, linux-sunxi, lkml, netdev

Hi Vincent,

On Tue, Dec 7, 2021 at 9:16 PM Vincent Mailhol
[off-list ref] 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,
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>
It works and LGTM.

Tested-by: Yasushi SHOJI <yashi@spacecubics.com>
-- 
              yashi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help