Skip to content

Commit 9da468c

Browse files
oleremsmb49
authored andcommitted
net: can: j1939: recover socket queue on CAN bus error during BAM transmission
BugLink: https://bugs.launchpad.net/bugs/2076435 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: stable@vger.kernel.org Reported-by: Alexander Hölzl <alexander.hoelzl@gmx.net> Tested-by: Alexander Hölzl <alexander.hoelzl@gmx.net> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/all/20240528070648.1947203-1-o.rempel@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
1 parent 30dd224 commit 9da468c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/can/j1939/transport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,8 @@ static int j1939_xtp_rx_rts_session_active(struct j1939_session *session,
16811681

16821682
j1939_session_timers_cancel(session);
16831683
j1939_session_cancel(session, J1939_XTP_ABORT_BUSY);
1684+
if (session->transmission)
1685+
j1939_session_deactivate_activate_next(session);
16841686

16851687
return -EBUSY;
16861688
}

0 commit comments

Comments
 (0)