|SUCCESS| net/ice: fix NULL dereference on ACL init failure

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Nov 6 08:14:51 CET 2026


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

_AI Code Review_

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

# Review of DPDK Patch: net/ice: fix NULL dereference on ACL init failure

## ERRORS

None identified.

## WARNINGS

None identified.

## INFO

None.

---

## Summary

This patch correctly addresses a NULL pointer dereference issue in the ICE driver's ACL cleanup path. The fix is appropriate and follows DPDK coding standards.

**Issue Analysis:**
The patch identifies a legitimate use-after-free scenario where:
1. `ice_acl_init()` fails to allocate `hw->acl_prof`, leaving it NULL
2. `ice_flow_init()` subsequently fails
3. `ice_dev_init()` calls `ice_flow_uninit()` for cleanup
4. `ice_acl_prof_free()` unconditionally dereferences `hw->acl_prof[ptype]` in the loop without checking if the array itself is NULL

**Fix Validation:**
The added NULL check at line 1068:
```c
if (hw->acl_prof == NULL)
	return;
```

This is the correct fix because:
- It follows the explicit comparison style required by DPDK (`== NULL` not `!`)
- It's placed before any dereference of `hw->acl_prof`
- Early return on NULL is a standard defensive programming pattern for cleanup functions
- The indentation and formatting are correct (single statement, no braces)

**Code Style Compliance:**
- Proper explicit NULL comparison: 
- Single-statement if without braces: 
- Correct indentation (tabs): 
- No trailing whitespace: 

**Process Compliance:**
- Fixes tags present and correctly formatted: 
- Cc: stable at dpdk.org appropriate for a crash fix: 
- Commit message clearly explains the bug and fix: 

Review-Result: CLEAN


More information about the test-report mailing list