--- /dev/null
+From b0aae0bde26f276401640e05e81a8a0ce3d8f70e Mon Sep 17 00:00:00 2001
+From: "David S. Miller" <davem@davemloft.net>
+Date: Fri, 12 Feb 2021 16:56:08 -0800
+Subject: octeontx2: Fix condition.
+
+From: David S. Miller <davem@davemloft.net>
+
+commit b0aae0bde26f276401640e05e81a8a0ce3d8f70e upstream.
+
+Fixes: 93efb0c656837 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
++++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+@@ -801,7 +801,7 @@ static int otx2_get_fecparam(struct net_
+ if (IS_ERR(rsp))
+ return PTR_ERR(rsp);
+
+- if (rsp->fwdata.supported_fec <= FEC_MAX_INDEX) {
++ if (rsp->fwdata.supported_fec < FEC_MAX_INDEX) {
+ if (!rsp->fwdata.supported_fec)
+ fecparam->fec = ETHTOOL_FEC_NONE;
+ else
--- /dev/null
+From 38b5133ad607ecdcc8d24906d1ac9cc8df41acd5 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 17 Feb 2021 10:41:39 +0300
+Subject: octeontx2-pf: Fix otx2_get_fecparam()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 38b5133ad607ecdcc8d24906d1ac9cc8df41acd5 upstream.
+
+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>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
++++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+@@ -805,7 +805,7 @@ static int otx2_get_fecparam(struct net_
+ 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;
+ }
scsi-core-fix-scsi_mode_select-buffer-length-handling.patch
alsa-usb-audio-fix-out-of-bounds-reads-when-finding-clock-sources.patch
media-uvcvideo-require-entities-to-have-a-non-zero-unique-id.patch
+octeontx2-fix-condition.patch
+octeontx2-pf-fix-otx2_get_fecparam.patch