|SUCCESS| [v2] net/netvsc: fix event buffer leak on realloc failure
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Sat Oct 31 10:30:05 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172325
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-31
# DPDK Patch Review
## Errors
None.
## Warnings
None.
## Info
**1. Explicit NULL comparison**
The comparison `if (new_buf == NULL)` follows DPDK style, which requires explicit comparison against NULL for pointers. This is correct.
**2. Resource leak fix correctness**
The patch correctly addresses a resource leak in `hn_process_events()`. The original code overwrites `rxq->event_buf` with the `rte_realloc()` return value, which leaks the old buffer if realloc fails. The fix uses a temporary pointer `new_buf` and only updates `rxq->event_buf` and `rxq->event_sz` on success, preserving the existing buffer and size on failure. This is the correct pattern.
**3. Pre-existing issue - event_buf cleanup**
The code does not free `rxq->event_buf` anywhere in the visible context. The patch does not introduce this issue, but if `rxq->event_buf` is allocated with `rte_realloc()` or `rte_malloc()`, it should be freed with `rte_free()` in the corresponding teardown path (queue cleanup, device close, etc.). This should be verified separately.
**4. Mailmap entry**
The addition to `.mailmap` is appropriate for a new contributor.
Review-Result: CLEAN
More information about the test-report
mailing list