diff options
| author | Priyank Rathod <rathodpriyank@google.com> | 2026-09-28 17:40:14 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-10-07 02:53:49 -0500 |
| commit | 622a70a52523008c7d7d3e1fa68d3729f5a982f3 (patch) | |
| tree | 3607014f91282e72e82d97b2158ae40790282909 /tools/perf/scripts/python/bin | |
| parent | d4c842c3af5bc52b3ca0b8a7f116114e43b6ba44 (diff) | |
PCI/AER: Document that aer_recover_queue() takes ownership of aer_regs
ghes_handle_aer() allocates the AER register snapshot that it passes to
aer_recover_queue() from ghes_estatus_pool. aer_recover_queue() returns
void, so the caller cannot tell whether the record was queued, and the AER
code owns the buffer from then on and must free it on every path.
None of this is documented at the definition of this exported function.
With GHES enabled, a new caller that passed a buffer from any other
allocator would hit the BUG() in gen_pool_free_owner() when the AER code
returns the buffer to ghes_estatus_pool, and a caller that freed the buffer
itself would cause a double free.
Add a kernel-doc comment that describes the parameters and states that
aer_recover_queue() takes ownership of @aer_regs, which must have been
allocated from ghes_estatus_pool.
No functional change.
Suggested-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lore.kernel.org/r/4513e7d4-4e2f-42d8-8f0c-2f0e03815dee@linux.intel.com
Signed-off-by: Priyank Rathod <rathodpriyank@google.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260928-b4-fix-aer-memleaks-v5-3-ba6b94c9c9a6@google.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
