[PATCH bpf-next 09/11] bpf: Return PTR_ERR from push_stack()
Eduard Zingerman
eddyz87 at gmail.com
Mon Mar 17 02:19:08 PDT 2025
On Thu, 2025-03-13 at 18:41 +0100, Luis Gerhorst wrote:
[...]
> @@ -2011,8 +2011,10 @@ static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env,
> int err;
>
> elem = kzalloc(sizeof(struct bpf_verifier_stack_elem), GFP_KERNEL);
> - if (!elem)
> - goto err;
> + if (!elem) {
> + err = -ENOMEM;
> + goto unrecoverable_err;
> + }
Could you please point me to a location, where exact error code
returned by updated push_stack() matters?
I checked push_stack() callgraph (in the attachment), but can't find
anything.
>
> elem->insn_idx = insn_idx;
> elem->prev_insn_idx = prev_insn_idx;
> @@ -2022,12 +2024,19 @@ static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env,
[...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: push_stack.dot
Type: text/vnd.graphviz
Size: 1706 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250317/d0766c57/attachment.dot>
More information about the linux-arm-kernel
mailing list