On 6/17/25 06:43, Daniel Wagner wrote:
> group_cpu_evenly() might have allocated less groups then requested:
>
> group_cpu_evenly()
>    __group_cpus_evenly()
>      alloc_nodes_groups()
>        # allocated total groups may be less than numgrps when
>        # active total CPU number is less then numgrps
>
> In this case, the caller will do an out of bound access because the
> caller assumes the masks returned has numgrps.
>
> Return the number of groups created so the caller can limit the access
> range accordingly.
>
> Acked-by: Thomas Gleixner<t...@linutronix.de>
> Reviewed-by: Hannes Reinecke<h...@suse.de>
> Reviewed-by: Ming Lei<ming....@redhat.com>
> Signed-off-by: Daniel Wagner<w...@kernel.org>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <k...@nvidia.com>

-ck


Reply via email to