Commit 5594035a authored by T.J. Mercier's avatar T.J. Mercier Committed by Treehugger Robot
Browse files

BACKPORT: bpf: Add dmabuf iterator



The dmabuf iterator traverses the list of all DMA buffers.

DMA buffers are refcounted through their associated struct file. A
reference is taken on each buffer as the list is iterated to ensure each
buffer persists for the duration of the bpf program execution without
holding the list mutex.

Signed-off-by: default avatarT.J. Mercier <tjmercier@google.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20250522230429.941193-3-tjmercier@google.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
(cherry picked from commit 76ea9553)
[TJ: file_ref_get -> get_file_rcu]
[TJ: bpf_iter_reg doesn't have "feature" yet on this branch.]
Bug: 445291677
Signed-off-by: default avatarT.J. Mercier <tjmercier@google.com>
Change-Id: Iaeda328f7693acc1506269c12cac5e7955e5c091
parent bfb159b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment