[Intel-wired-lan] [PATCH] ixgbe: add array bounds check
Paul Greenwalt
paul.greenwalt at intel.com
Mon Oct 23 15:21:51 UTC 2017
Add bounds check for index fcoe_i of rx_ring array.
Signed-off-by: Paul Greenwalt <paul.greenwalt at intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index a23c2b5..5772fe2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -698,6 +698,8 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
}
fcoe_i = fcoe->offset + (i % fcoe->indices);
+ if (fcoe_i >= MAX_RX_QUEUES)
+ fcoe_i = MAX_RX_QUEUES - 1;
fcoe_i &= IXGBE_FCRETA_ENTRY_MASK;
fcoe_q = adapter->rx_ring[fcoe_i]->reg_idx;
fcoe_q |= fcoe_q_h;
--
2.7.4
More information about the Intel-wired-lan
mailing list