[PATCH v1 1/1] net/ixgbe: fix EEPROM read callback check

Anatoly Burakov anatoly.burakov at intel.com
Fri Oct 30 11:02:00 CET 2026


The NULL check added for the E610 EEPROM write path was placed in the
EEPROM read handler, so a missing write callback rejects reads while the
write handler still dereferences it. Check the read callback in the read
handler and move the write callback check to the write handler.

Fixes: 04c3e44b4aee ("net/ixgbe: fix null dereference on EEPROM write for E610")
Cc: stable at dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/intel/ixgbe/ixgbe_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
index 46db8c49d09..9b43619bb79 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
@@ -7016,7 +7016,7 @@ ixgbe_get_eeprom(struct rte_eth_dev *dev,
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return -E_RTE_SECONDARY;
 
-	if (eeprom->ops.write_buffer == NULL)
+	if (eeprom->ops.read_buffer == NULL)
 		return -ENOTSUP;
 
 	first = in_eeprom->offset >> 1;
@@ -7047,6 +7047,9 @@ ixgbe_set_eeprom(struct rte_eth_dev *dev,
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return -E_RTE_SECONDARY;
 
+	if (eeprom->ops.write_buffer == NULL)
+		return -ENOTSUP;
+
 	first = in_eeprom->offset >> 1;
 	length = in_eeprom->length >> 1;
 	if ((first > hw->eeprom.word_size) ||
-- 
2.52.0



More information about the dev mailing list