Commit 85c9daa
ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
[ Upstream commit c8ba7ad ]
Number of MW LUTs depends on NTB configuration and can be set to MAX_MWS,
This patch protects against invalid index out of bounds access to mw_sizes
When invalid access print message to user that configuration is not valid.
Signed-off-by: Maciej Grochowski <Maciej.Grochowski@sony.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent a4557dc commit 85c9daa
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1314 | 1314 | | |
1315 | 1315 | | |
1316 | 1316 | | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1317 | 1323 | | |
1318 | 1324 | | |
1319 | 1325 | | |
| |||
0 commit comments