octeontx2-pf: Fix otx2_get_fecparam()
PATCH 1/1 octeontx2-pf: Fix otx2_get_fecparam()
Static checkers complained about an off by one read overflow in otx2_get_fecparam() and we applied two conflicting fixes for it.
Correct: b0aae0bde26f ("octeontx2: Fix condition.")
Wrong: 93efb0c65683 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
Revert the incorrect fix.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +1 -1
@@ -968,7 +968,7 @@ static int otx2_get_fecparam(struct net_device *netdev,if (!rsp->fwdata.supported_fec) fecparam->fec =ETHTOOL_FEC_NONE ;else - fecparam->fec = fec[rsp->fwdata.supported_fec -1 ]; + fecparam->fec = fec[rsp->fwdata.supported_fec]; }return 0 ; }
Signature · 1 line
2.30.0
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 9 lines · On Wed, 17 Feb 2021 10:41:39 +0300 you wrote:
Static checkers complained about an off by one read overflow in
otx2_get_fecparam()and we applied two conflicting fixes for it.Correct:
b0aae0bde26f("octeontx2: Fix condition.")
Wrong:93efb0c65683("octeontx2-pf: Fix out-of-bounds read inotx2_get_fecparam()")Revert the incorrect fix.
[...]
Here is the summary with links:
- [net-next] octeontx2-pf: Fix otx2_get_fecparam()
https://git.kernel.org/netdev/net-next/c/38b5133ad607
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html