Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
can: isotp: return -EADDRNOTAVAIL when reading from unbound socket
stable inclusion from stable-v5.10.110 commit f402c498651993de361f349ac0cedb9f8622319f bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f402c498651993de361f349ac0cedb9f8622319f -------------------------------- [ Upstream commit 30ffd53 ] When reading from an unbound can-isotp socket the syscall blocked indefinitely. As unbound sockets (without given CAN address information) do not make sense anyway we directly return -EADDRNOTAVAIL on read() analogue to the known behavior from sendmsg(). Fixes: e057dd3 ("can: add ISO 15765-2:2016 transport protocol") Link: linux-can/can-utils#349 Link: https://lore.kernel.org/all/[email protected] Suggested-by: Derek Will <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Yu Liao <[email protected]> Reviewed-by: Wei Li <[email protected]> Signed-off-by: Zheng Zengkai <[email protected]>
- Loading branch information