|WARNING| net/qede: initialize ptt to prevent derefence

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Nov 13 20:56:03 CET 2026


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

_AI Code Review_

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

**Error: PTT window acquired in the VF branch is never released**

The new `else` branch acquires a PTT entry but never releases it. Every call to `qed_fill_dev_info()` on this path leaks one PTT window from the hwfn pool.

```
+		ptt = ecore_ptt_acquire(ECORE_LEADING_HWFN(edev));
+		if (ptt)
+			ecore_mcp_get_mfw_ver(ECORE_LEADING_HWFN(edev), ptt,
+					      &dev_info->mfw_rev, NULL);
```

The `if` branch just above, in the diff context, pairs its acquire with `ecore_ptt_release(ECORE_LEADING_HWFN(edev), ptt);`. The new code does not. PTT entries come from a small fixed pool, so repeated dev_info queries will exhaust it. After that, every later `ecore_ptt_acquire()` fails, including those in the PF path.

Suggested fix:

```c
	} else {
		ptt = ecore_ptt_acquire(ECORE_LEADING_HWFN(edev));
		if (ptt != NULL) {
			ecore_mcp_get_mfw_ver(ECORE_LEADING_HWFN(edev), ptt,
					      &dev_info->mfw_rev, NULL);
			ecore_ptt_release(ECORE_LEADING_HWFN(edev), ptt);
		}
	}
```

**Info: implicit pointer test**

`if (ptt)` should be `if (ptt != NULL)` per DPDK style. The suggested fix above already does this.

Review-Result: ERROR


More information about the test-report mailing list