Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
can: isotp: support MSG_TRUNC flag when reading from socket
stable inclusion from stable-v5.10.110 commit c037e135391c70d4a3304b5df012d404ad8d3d58 bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c037e135391c70d4a3304b5df012d404ad8d3d58 -------------------------------- [ Upstream commit 42bf50a ] When providing the MSG_TRUNC flag via recvmsg() syscall the return value provides the real length of the packet or datagram, even when it was longer than the passed buffer. Fixes: e057dd3 ("can: add ISO 15765-2:2016 transport protocol") Link: linux-can/can-utils#347 (comment) Link: https://lore.kernel.org/all/20220316164258.54155-3-socketcan@hartkopp.net Suggested-by: Derek Will <derekrobertwill@gmail.com> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Yu Liao <liaoyu15@huawei.com> Reviewed-by: Wei Li <liwei391@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
- Loading branch information