|WARNING| net/bnxt: fix flow db lock-free issue during shutdown
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Oct 5 19:29:15 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/170563
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-05
# DPDK Patch Review
## Summary
This patch fixes the ordering of cleanup operations in `ulp_tfc_deinit()` to prevent accessing a destroyed mutex. The fix is correct and addresses a real correctness bug.
---
## Findings
### Errors
**Use-after-free of destroyed mutex**
The original code calls `pthread_mutex_destroy(&bp->ulp_ctx->cfg_data->flow_db_lock)` before `ulp_tfc_tbl_scope_deinit(bp)`. If `ulp_tfc_tbl_scope_deinit()` internally acquires `flow_db_lock` (which is likely given the naming and context), it would attempt to lock an already-destroyed mutex, causing undefined behavior.
The patch correctly moves `ulp_tfc_tbl_scope_deinit(bp)` before the `pthread_mutex_destroy()` call, ensuring the lock is still valid during table scope cleanup.
**Suggested fix**: The patch already implements the correct fix.
---
### Warnings
None.
---
### Info
None.
---
## Conclusion
The patch correctly fixes a use-after-free bug involving a destroyed mutex. The reordering ensures cleanup operations that may need the lock complete before the lock is destroyed. This is a valid bug fix appropriate for backporting to stable branches.
**Recommendation**: Approve
More information about the test-report
mailing list