Re: [PATCH bpf-next v3 1/5] bpf: dispatcher: allocate bpf_dispatcher->rw_image with vzalloc()
From: Mike Rapoport
Date: Thu Jul 16 2026 - 05:29:23 EST
On Thu, Jul 16, 2026 at 08:52:25AM +0000, bot+bpf-ci@xxxxxxxxxx wrote:
> > diff --git a/kernel/bpf/dispatcher.c b/kernel/bpf/dispatcher.c
> > index ea2d60dc1fee..79f0c222c583 100644
> > --- a/kernel/bpf/dispatcher.c
> > +++ b/kernel/bpf/dispatcher.c
> > @@ -148,7 +148,10 @@ void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,
> > d->image = bpf_prog_pack_alloc(PAGE_SIZE, bpf_jit_fill_hole_with_zero, false);
> > if (!d->image)
> > goto out;
> > - d->rw_image = bpf_jit_alloc_exec(PAGE_SIZE);
> > + /* d->rw_image doesn't need to be in module memory range, so we
> > + * can use vzalloc.
> > + */
> > + d->rw_image = vzalloc(PAGE_SIZE);
>
> This isn't a bug, but for multi-line comments under kernel/bpf/ the opening
> /* is expected to sit on its own line, so would this read better as:
>
> /*
> * d->rw_image doesn't need to be in module memory range, so we
> * can use vzalloc.
> */
This really contradicts what I see in the code :/
> > if (!d->rw_image) {
> > bpf_prog_pack_free(d->image, PAGE_SIZE);
> > d->image = NULL;
>
>
> ---
> 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/29482648692
--
Sincerely yours,
Mike.