[PATCH 7/8] sched_ext: Sub-allocator over kernel-claimed BPF arena pages

Tejun Heo tj at kernel.org
Thu May 21 10:22:29 PDT 2026


Hello,

On Thu, May 21, 2026 at 09:56:05AM +0200, Andrea Righi wrote:
> IIUC, since @page_cnt is sized to cover @size and the new chunk is added empty
> to the pool, gen_pool_alloc() here should always succeed. Should we do:
>
>   if (WARN_ON_ONCE(!kern_va))
>       return NULL;
>
> to catch potential logical bugs / future concurrency / exotic configurations?

Good point. It works for a single caller, but a concurrent one could drain
the new chunk between grow and retry. I'll switch it to a loop.

Thanks.

--
tejun



More information about the linux-arm-kernel mailing list