* [PATCH net-next] octeontx2-pf: Fix otx2_get_fecparam()
@ 2021-02-17 7:41 Dan Carpenter
2021-02-17 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-02-17 7:41 UTC (permalink / raw)
To: Sunil Goutham, hariprasad, Gustavo A. R. Silva, Christina Jacob
Cc: Geetha sowjanya, Subbaraya Sundeep, David S. Miller,
Jakub Kicinski, netdev, kernel-janitors
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.
Fixes: 93efb0c65683 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index 5fe74036a611..f4962a97a075 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -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;
}
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] octeontx2-pf: Fix otx2_get_fecparam()
2021-02-17 7:41 [PATCH net-next] octeontx2-pf: Fix otx2_get_fecparam() Dan Carpenter
@ 2021-02-17 22:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-17 22:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: sgoutham, hkelam, gustavoars, cjacob, gakula, sbhatta, davem,
kuba, netdev, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
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 in otx2_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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-17 22:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 7:41 [PATCH net-next] octeontx2-pf: Fix otx2_get_fecparam() Dan Carpenter
2021-02-17 22:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.