Commit dc7af7d
Benjamin Poirier
net/mlx5: Add a timeout to acquire the command queue semaphore
JIRA: https://issues.redhat.com/browse/RHEL-44225
CVE: CVE-2024-38556
Upstream-status: v6.10-rc1
Conflicts:
- drivers/net/ethernet/mellanox/mlx5/core/cmd.c
In cmd_work_handler() hunk 1:
Due to the absence of
58db728 net/mlx5: Re-organize mlx5_cmd struct (v6.6-rc1)
struct mlx5_cmd members sem and pages_sem moved inside struct
vars
8f5100d net/mlx5e: Fix a race in command alloc flow (v6.7-rc7)
-> Adjust context, remove "vars." usage
In cmd_work_handler() hunk 2:
Due to the absence of
58db728 net/mlx5: Re-organize mlx5_cmd struct (v6.6-rc1)
8f5100d net/mlx5e: Fix a race in command alloc flow (v6.7-rc7)
-> Adjust context, remove "vars." usage
In cmd_work_handler() hunk 3:
Due to the absence of
8f5100d net/mlx5e: Fix a race in command alloc flow (v6.7-rc7)
-> Adjust context
commit 485d65e
Author: Akiva Goldberger <agoldberger@nvidia.com>
Date: Thu May 9 14:29:50 2024 +0300
net/mlx5: Add a timeout to acquire the command queue semaphore
Prevent forced completion handling on an entry that has not yet been
assigned an index, causing an out of bounds access on idx = -22.
Instead of waiting indefinitely for the sem, blocking flow now waits for
index to be allocated or a sem acquisition timeout before beginning the
timer for FW completion.
Kernel log example:
mlx5_core 0000:06:00.0: wait_func_handle_exec_timeout:1128:(pid 185911): cmd[-22]: CREATE_UCTX(0xa04) No done completion
Fixes: 8e715cd ("net/mlx5: Set command entry semaphore up once got index free")
Signed-off-by: Akiva Goldberger <agoldberger@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20240509112951.590184-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Benjamin Poirier <bpoirier@redhat.com>1 parent c4845f3 commit dc7af7d
2 files changed
+33
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
969 | | - | |
970 | | - | |
| 969 | + | |
971 | 970 | | |
972 | 971 | | |
973 | 972 | | |
974 | 973 | | |
| 974 | + | |
| 975 | + | |
975 | 976 | | |
976 | | - | |
| 977 | + | |
977 | 978 | | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
982 | 995 | | |
983 | 996 | | |
984 | 997 | | |
| |||
991 | 1004 | | |
992 | 1005 | | |
993 | 1006 | | |
994 | | - | |
| 1007 | + | |
995 | 1008 | | |
996 | 1009 | | |
997 | 1010 | | |
998 | 1011 | | |
| 1012 | + | |
999 | 1013 | | |
1000 | 1014 | | |
1001 | 1015 | | |
1002 | 1016 | | |
1003 | 1017 | | |
1004 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
1005 | 1021 | | |
1006 | 1022 | | |
1007 | 1023 | | |
| |||
1021 | 1037 | | |
1022 | 1038 | | |
1023 | 1039 | | |
1024 | | - | |
| 1040 | + | |
1025 | 1041 | | |
1026 | 1042 | | |
1027 | 1043 | | |
| |||
1141 | 1157 | | |
1142 | 1158 | | |
1143 | 1159 | | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1144 | 1163 | | |
1145 | 1164 | | |
1146 | 1165 | | |
| |||
1155 | 1174 | | |
1156 | 1175 | | |
1157 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1158 | 1180 | | |
1159 | 1181 | | |
1160 | 1182 | | |
| |||
1206 | 1228 | | |
1207 | 1229 | | |
1208 | 1230 | | |
| 1231 | + | |
1209 | 1232 | | |
1210 | 1233 | | |
1211 | 1234 | | |
| |||
1223 | 1246 | | |
1224 | 1247 | | |
1225 | 1248 | | |
1226 | | - | |
| 1249 | + | |
1227 | 1250 | | |
1228 | 1251 | | |
1229 | 1252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| 854 | + | |
854 | 855 | | |
855 | 856 | | |
856 | 857 | | |
| |||
0 commit comments