summaryrefslogtreecommitdiff
path: root/kernel/bpf/trampoline.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /kernel/bpf/trampoline.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/bpf/trampoline.c')
-rw-r--r--kernel/bpf/trampoline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c
index b94565843f77..84db9e658e52 100644
--- a/kernel/bpf/trampoline.c
+++ b/kernel/bpf/trampoline.c
@@ -256,7 +256,7 @@ static int direct_ops_mod(struct bpf_trampoline *tr, void *addr, bool lock_direc
*/
static int direct_ops_alloc(struct bpf_trampoline *tr)
{
- tr->fops = kzalloc_obj(struct ftrace_ops, GFP_KERNEL);
+ tr->fops = kzalloc_obj(struct ftrace_ops);
if (!tr->fops)
return -ENOMEM;
tr->fops->private = tr;
@@ -342,7 +342,7 @@ static struct bpf_trampoline *bpf_trampoline_lookup(u64 key, unsigned long ip)
goto out;
}
}
- tr = kzalloc_obj(*tr, GFP_KERNEL);
+ tr = kzalloc_obj(*tr);
if (!tr)
goto out;
if (direct_ops_alloc(tr)) {
@@ -446,7 +446,7 @@ bpf_trampoline_get_progs(const struct bpf_trampoline *tr, int *total, bool *ip_a
int kind;
*total = 0;
- tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX, GFP_KERNEL);
+ tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX);
if (!tlinks)
return ERR_PTR(-ENOMEM);
@@ -569,7 +569,7 @@ static struct bpf_tramp_image *bpf_tramp_image_alloc(u64 key, int size)
void *image;
int err = -ENOMEM;
- im = kzalloc_obj(*im, GFP_KERNEL);
+ im = kzalloc_obj(*im);
if (!im)
goto out;