diff options
| author | Selvin Xavier <selvin.xavier@broadcom.com> | 2026-07-21 04:54:38 -0700 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-07-28 08:03:10 -0400 |
| commit | e202e3a55cf10cdbc36c9a7847b0af1f4290fb87 (patch) | |
| tree | 601637a78e82322eed3daa74ef476a31497ea22f /tools/perf/scripts/python/bin/task-analyzer-record | |
| parent | 97eafb59d41e62ae54bb7ec61004409d02b7dc74 (diff) | |
RDMA/bnxt_re: Defer toggle page free to rdma_user_mmap_entry teardown
Fix the page lifetime by making the rdma_user_mmap_entry the sole owner
of the toggle page allocation. Creating the rdma_user_mmap_entry and page
during the CQ/SRQ creation time. Freeing the page is handled when the
mmap free is called. Introduce struct bnxt_re_toggle_mem to carry
the mmap_offset for the lifetime of the GET_TOGGLE_MEM uobject handle.
bnxt_re_destroy_cq/srq can erase the entry from the XArray and call
rdma_user_mmap_entry_remove() on the toggle_entry concurrently with
the caller's xa_load() and its subsequent use of that toggle_entry.
Guard against this by taking an extra kref directly on the
toggle_entry's rdma_user_mmap_entry while the GET_TOGGLE_MEM handle
exists, released when the handle is destroyed. This pins exactly the
resource that GET_TOGGLE_MEM hands out (the mmap offset/page),
independent of the CQ/SRQ's own lifetime.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/task-analyzer-record')
0 files changed, 0 insertions, 0 deletions
