]> www.infradead.org Git - users/hch/misc.git/commit
ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
authorMaciej Grochowski <Maciej.Grochowski@sony.com>
Thu, 13 Feb 2025 22:53:18 +0000 (14:53 -0800)
committerJon Mason <jdmason@kudzu.us>
Mon, 7 Apr 2025 13:22:13 +0000 (09:22 -0400)
commitbc8a80bf24e06e656fd8a1eedb5fc314d4020f9f
treed4290b6e64e3bec9e2b27db407f166d2f0c85e5c
parent74a502d3b16e3f7c03bc3b08f54bfbdfc723cb86
ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access

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>
drivers/ntb/hw/mscc/ntb_hw_switchtec.c