bpf: Inline bpf_iter_num_destroy() as a no-op

Once destroy() returns the stack slot is no longer tracked as iterator
state, so zeroing it is dead work. Make the kfunc a no-op and inline the
call to a single BPF_JA 0 (the fixup can't drop the instruction outright,
so emit a nop; the JITs elide it).

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260804134601.2305303-5-puranjay@kernel.org
This commit is contained in:
Puranjay Mohan 2026-08-04 06:45:56 -07:00 • committed by Andrii Nakryiko
commit 39f047682f
2 changed files with 5 additions and 3 deletions