Re: [PATCH bpf-next v1] bpftool: Skip prog/map that disappears while looking it up by name

From: bot+bpf-ci

Date: Mon Jul 20 2026 - 04:05:42 EST


> commit 084a91fc9c087ee9f5a2163da8368590cad6f121
> Author: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>
>
> bpftool: Skip prog/map that disappears while looking it up by name
>
> Looking up a prog or map by name walks the whole id space. There is a
> window between bpf_prog_get_next_id()/bpf_map_get_next_id() and getting
> an fd for that id in which an unrelated object can be freed, and the
> lookup then fails with ENOENT and aborts the whole command.
>
> Skip such ids and keep walking, the same way do_show() already does.
>
> Signed-off-by: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>

This looks like a bug fix for the prog/map lookup functions. Should this
include:

Fixes: a479b8ce4ed1 ("tools/bpftool: Move map/prog parsing logic into common")


---
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/29725108152