Re: [PATCH bpf-next] ftrace: Use hash argument for tmp_ops in update_ftrace_direct_mod
From: bot+bpf-ci
Date: Thu Mar 12 2026 - 08:27:59 EST
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 8df69e702706..71dcbfeac86c 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -6608,7 +6608,7 @@ int update_ftrace_direct_mod(struct ftrace_ops *ops, struct ftrace_hash *hash, b
>
> /* Enable the tmp_ops to have the same functions as the direct ops */
> ftrace_ops_init(&tmp_ops);
> - tmp_ops.func_hash = ops->func_hash;
> + tmp_ops.func_hash->filter_hash = hash;
The comment above says "Enable the tmp_ops to have the same functions
as the direct ops", but after this change tmp_ops only gets the
modified subset via the hash argument, not all of the direct ops
functions. Should the comment be updated to reflect this?
Also, the commit message has a minor grammar issue:
> which contains only the modified sites is always a subset of the
> ops->func_hash.
Reads like it is missing an "and" between "sites" and "is".
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23000924618