summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2026-07-26 15:21:44 +0300
committerLeon Romanovsky <leonro@nvidia.com>2026-07-29 07:46:56 -0400
commitfdfb5cea4bf070cdb31d997efd87bb684df041fd (patch)
tree45ee73df1eb6802e6cd424978b9d29ce032211f5 /tools/perf
parent033a79e308e4fe832b0924347eda8c4364055174 (diff)
RDMA/cxgb4: free STAG index when TPT entry write fails
write_tpt_entry() allocates a new STAG index with c4iw_get_resource() and bumps stats.stag.cur before programming the entry. When write_adapter_mem() fails, it returns the error without releasing the index or reversing the statistic. No MR is inserted into rhp->mrs, so deregistration never reclaims it, leaking the index until device teardown. Record whether this call allocated the index and, on a failed write, return it to tpt_table and decrement stats.stag.cur. Key the rollback on both the write error and that flag, not the error alone: a non-reset update carries a caller-owned STAG that this call did not allocate and must not free. Fixes: ec3eead21718 ("RDMA/cxgb4: Remove kfifo usage") Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions