Commit 36dc3d0
committed
can: isotp: split tx timer into transmission and timeout
JIRA: https://issues.redhat.com/browse/RHEL-80832
commit 4f027cb
Author: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Wed Jan 4 15:57:01 2023 +0100
can: isotp: split tx timer into transmission and timeout
The timer for the transmission of isotp PDUs formerly had two functions:
1. send two consecutive frames with a given time gap
2. monitor the timeouts for flow control frames and the echo frames
This led to larger txstate checks and potentially to a problem discovered
by syzbot which enabled the panic_on_warn feature while testing.
The former 'txtimer' function is split into 'txfrtimer' and 'txtimer'
to handle the two above functionalities with separate timer callbacks.
The two simplified timers now run in one-shot mode and make the state
transitions (especially with isotp_rcv_echo) better understandable.
Fixes: 8663378 ("can: isotp: fix tx state handling for echo tx processing")
Reported-by: syzbot+5aed6c3aaba661f5b917@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org # >= v6.0
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230104145701.2422-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Radu Rendec <rrendec@redhat.com>1 parent c614576 commit 36dc3d0
1 file changed
+29
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
874 | | - | |
| 874 | + | |
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | | - | |
883 | 882 | | |
884 | | - | |
885 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
886 | 886 | | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
| 887 | + | |
894 | 888 | | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
903 | 893 | | |
904 | | - | |
905 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
906 | 897 | | |
907 | | - | |
| 898 | + | |
| 899 | + | |
908 | 900 | | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
913 | 905 | | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
918 | 909 | | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
923 | 913 | | |
924 | | - | |
| 914 | + | |
925 | 915 | | |
926 | 916 | | |
927 | 917 | | |
| |||
1195 | 1185 | | |
1196 | 1186 | | |
1197 | 1187 | | |
| 1188 | + | |
1198 | 1189 | | |
1199 | 1190 | | |
1200 | 1191 | | |
| |||
1598 | 1589 | | |
1599 | 1590 | | |
1600 | 1591 | | |
| 1592 | + | |
| 1593 | + | |
1601 | 1594 | | |
1602 | 1595 | | |
1603 | 1596 | | |
| |||
0 commit comments