On 04.04.23 08:10, Marc Kleine-Budde wrote:
On 31.03.2023 14:55:11, Michal Sojka wrote:
When using select/poll/epoll() with a non-blocking ISOTP socket to
wait for when non-blocking write is possible, false EPOLLOUT event is
sometimes returned. This can happen at least after sending a message
which must be split to multiple CAN frames.
The reason is that isotp_sendmsg() returns -EAGAIN when tx.state is
not equal to ISOTP_IDLE and this behavior is not reflected in
datagram_poll(), which is used in isotp_ops.
This is fixed by introducing ISOTP-specific poll function, which
suppresses the EPOLLOUT events in that case.
Signed-off-by: Michal Sojka <michal.sojka@xxxxxxx>
Reported-by: Jakub Jira <jirajak2@xxxxxxxxxxx>
Tested-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
Acked-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
Can you add a fixes tag?
The poll function was datagram_poll from the first day - so it never worked:
Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol")
Best regards,
Oliver