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<[email protected]>
> Reviewed-by: Hannes Reinecke<[email protected]>
> Reviewed-by: Ming Lei<[email protected]>
> Signed-off-by: Daniel Wagner<[email protected]>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>

-ck


Reply via email to