|SUCCESS| net/iavf: fix interrupt callback race on close

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Oct 21 01:04:56 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/171276

_AI Code Review_

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

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

**Race condition analysis - good fix**

The patch correctly identifies and fixes a race between `iavf_dev_close()` and the interrupt handler thread. The switch from `rte_intr_callback_unregister()` to `rte_intr_callback_unregister_sync()` prevents two crash scenarios:

1. Use-after-free in `iavf_handle_virtchnl_msg()` when the handler accesses `dev->data` after `rte_eth_dev_release_port()` has set it to NULL
2. Bad file descriptor panic in `eal_intr_thread_main()` when the eventfd is closed while the callback remains registered

The commit message thoroughly explains the race window and why the sync variant is safe here (the handler never closes/reinits the port itself, so no deadlock risk).

**Pattern consistency**

The patch aligns `iavf_dev_init()` error path and `iavf_dev_close()` with the pattern already used in `ice_dev_close()` (mentioned in commit message). This is the correct approach for interrupt callback cleanup in PMD close/error paths.

**No additional validation needed**

The sync variant is unconditionally safe in these two call sites:
- `iavf_dev_close()`: cannot be called from `iavf_dev_interrupt_handler()` (the handler posts events to a separate thread rather than recursing)
- `iavf_dev_init()` error path: initialization context, no active callbacks yet

Review-Result: CLEAN


More information about the test-report mailing list