]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Fix otx2_get_fecparam()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 17 Feb 2021 07:41:39 +0000 (10:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2021 22:33:22 +0000 (14:33 -0800)
commitfbbe40f37545aff88401eda5911320e040ba80c1
treed96a1e85503a53efc5ed4c7116ea72c434019557
parentc30c698684fec71c9f9cf3c964d20e8b5d931e1a
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: 777e11e51b66 ("octeontx2: Fix condition.")
  Wrong: 8752081e7b63 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")

Revert the incorrect fix.

Fixes: 8752081e7b63 ("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>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c