[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240528070648.1947203-1-o.rempel@pengutronix.de>
Date: Tue, 28 May 2024 09:06:48 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Robin van der Gracht <robin@...tonic.nl>,
Oliver Hartkopp <socketcan@...tkopp.net>,
Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
stable@...r.kernel.org,
Alexander Hölzl <alexander.hoelzl@....net>,
kernel@...gutronix.de,
linux-can@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] j1939: recover socket queue on CAN bus error during BAM transmission
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: 9d71dd0c70099 ("can: add support of SAE J1939 protocol")
Cc: stable@...r.kernel.org
Reported-by: Alexander Hölzl <alexander.hoelzl@....net>
Tested-by: Alexander Hölzl <alexander.hoelzl@....net>
Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
---
net/can/j1939/transport.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index fe3df23a25957..9805124d16763 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -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;
}
--
2.39.2
Powered by blists - more mailing lists