Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bnxt_en: Improve RX consumer index validity check.
There is logic to check that the RX/TPA consumer index is the expected index to work around a hardware problem. However, the potentially bad consumer index is first used to index into an array to reference an entry. This can potentially crash if the bad consumer index is beyond legal range. Improve the logic to use the consumer index for dereferencing after the validity check and log an error message. Fixes: fa7e281 ("bnxt_en: Add workaround to detect bad opaque in rx completion (part 2)") Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information