|WARNING| [v1,1/1] net/ixgbe: fix EEPROM read callback check

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Oct 30 12:02:39 CET 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/172286

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-30

# DPDK Patch Review

## Summary
This patch fixes a logic error in the ixgbe driver where the write callback NULL check was placed in the read handler instead of the write handler.

---

## ERRORS

**NULL check in wrong function allows NULL dereference**

The original code checks `eeprom->ops.write_buffer` in `ixgbe_get_eeprom()` (the read handler), but `ixgbe_set_eeprom()` (the write handler) then dereferences `eeprom->ops.write_buffer` at line 7072 without checking it.

This patch correctly moves the write callback check to the write handler and changes the read handler to check `read_buffer` instead.

Line in original code (before patch):
```c
if (eeprom->ops.write_buffer == NULL)
    return -ENOTSUP;
```
This was in `ixgbe_get_eeprom()` but should have been checking `read_buffer`, and `write_buffer` should be checked in `ixgbe_set_eeprom()` where it is used.

The patch fixes both issues correctly.

---

## WARNINGS

None.

---

## INFO

None.

---

Review-Result: ERROR


More information about the test-report mailing list