Skip to content

Commit

Permalink
net: can: j1939: recover socket queue on CAN bus error during BAM tra…
Browse files Browse the repository at this point in the history
…nsmission

commit 9ad1da1 upstream.

Addresses an issue where a CAN bus error during a BAM transmission
could stall the socket queue, preventing further transmissions even
after the bus error is resolved. The fix activates the next queued
session after the error recovery, allowing communication to continue.

Fixes: 9d71dd0 ("can: add support of SAE J1939 protocol")
Cc: [email protected]
Reported-by: Alexander Hölzl <[email protected]>
Tested-by: Alexander Hölzl <[email protected]>
Signed-off-by: Oleksij Rempel <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Cc: [email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
olerem authored and gregkh committed Jul 5, 2024
1 parent ba7e5ae commit cdfc341
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/can/j1939/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,8 @@ static int j1939_xtp_rx_rts_session_active(struct j1939_session *session,

j1939_session_timers_cancel(session);
j1939_session_cancel(session, J1939_XTP_ABORT_BUSY);
if (session->transmission)
j1939_session_deactivate_activate_next(session);

return -EBUSY;
}
Expand Down

0 comments on commit cdfc341

Please sign in to comment.