|WARNING| [2/2] common/mlx5: fix errno clobber on interrupt FD clear

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Nov 3 13:12:26 CET 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-03

# DPDK Patch Review

## PATCH 1/2: drivers: fix ASan ODR violation on glue symbols

### ERRORS

None identified.

### WARNINGS

**Missing release notes**

This fix resolves a real bug (AddressSanitizer ODR violation) that affects users building with ASan. The fix changes how PMD code references the glue table through a new internal symbol. While the change is internal and does not affect normal builds, it is user-visible in that it fixes a class of ASan startup failures. This warrants a release note entry in the "Fixed Issues" section.

Suggested addition to `doc/guides/rel_notes/release_XX_YY.rst`:
```rst
* **Fixed AddressSanitizer ODR violation in mlx4/mlx5 drivers.**

  Resolved symbol collision between PMD and glue library when building
  with AddressSanitizer. The PMD now references the glue table through
  a private symbol, allowing ASan builds to run without startup aborts.
```

### INFO

None.

---

## PATCH 2/2: common/mlx5: fix errno clobber on interrupt FD clear

### ERRORS

None identified.

### WARNINGS

None identified.

### INFO

**Pre-existing: Potential `rte_intr_fd_set()` error handling inconsistency**

In `mlx5_os_interrupt_handler_destroy()` at line 1194, the patch adds a check for `rte_intr_fd_set()` failure and logs a debug message. However, on this non-error path (normal teardown), a failure to clear the fd reference is logged but otherwise ignored--no saved errno to restore, no cleanup skipped. This is acceptable because the function immediately frees the handle afterward, so the stale fd value becomes unreachable.

By contrast, in the `err:` path in `mlx5_os_interrupt_handler_create()` (lines 1111-1116), the patch saves and restores `rte_errno` around the `rte_intr_fd_set()` call to prevent the original allocation/setup failure code from being lost. This is the correct pattern for error paths.

The difference in handling (restore errno on error path, ignore on cleanup path) is intentional and correct. No change needed, but worth noting the reasoning for clarity.

---

## SUMMARY

Patch 1/2 is a correct fix for an AddressSanitizer-specific issue. The approach (private symbol indirection) is sound and does not affect non-ASan builds. However, it should include a release note entry because it fixes a user-visible bug (ASan startup failures).

Patch 2/2 correctly addresses Coverity issues 912881 and 912878 by preventing `rte_intr_fd_set()` from clobbering the original error code on the failure path. The added errno save/restore logic is appropriate, and the debug logging on failure is helpful for diagnostics.

Review-Result: WARNING


More information about the test-report mailing list