diff options
| author | Maxime Ripard <mripard@kernel.org> | 2026-04-23 14:43:06 +0200 |
|---|---|---|
| committer | Maxime Ripard <mripard@kernel.org> | 2026-04-23 14:43:06 +0200 |
| commit | d13e855ee923c2ae78307bf6c354305f1406b9e2 (patch) | |
| tree | 07313514d19864c9e269993220dbcc5070df4504 /include/linux/bpf_mem_alloc.h | |
| parent | 0b13173d27fa15679463b62a10cfa8b3d6c3a71c (diff) | |
| parent | 028ef9c96e96197026887c0f092424679298aae8 (diff) | |
Merge drm/drm-fixes into drm-misc-fixes
Tomi needs 7.0 to apply a patch from drm-misc-fixes.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include/linux/bpf_mem_alloc.h')
| -rw-r--r-- | include/linux/bpf_mem_alloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/bpf_mem_alloc.h b/include/linux/bpf_mem_alloc.h index e45162ef59bb..4ce0d27f8ea2 100644 --- a/include/linux/bpf_mem_alloc.h +++ b/include/linux/bpf_mem_alloc.h @@ -14,6 +14,8 @@ struct bpf_mem_alloc { struct obj_cgroup *objcg; bool percpu; struct work_struct work; + void (*dtor_ctx_free)(void *ctx); + void *dtor_ctx; }; /* 'size != 0' is for bpf_mem_alloc which manages fixed-size objects. @@ -32,6 +34,10 @@ int bpf_mem_alloc_percpu_init(struct bpf_mem_alloc *ma, struct obj_cgroup *objcg /* The percpu allocation with a specific unit size. */ int bpf_mem_alloc_percpu_unit_init(struct bpf_mem_alloc *ma, int size); void bpf_mem_alloc_destroy(struct bpf_mem_alloc *ma); +void bpf_mem_alloc_set_dtor(struct bpf_mem_alloc *ma, + void (*dtor)(void *obj, void *ctx), + void (*dtor_ctx_free)(void *ctx), + void *ctx); /* Check the allocation size for kmalloc equivalent allocator */ int bpf_mem_alloc_check_size(bool percpu, size_t size); |
