Re: [PATCH v3 6/6] sparc/leon: Remove on-stack cpumask var

From: Sam Ravnborg
Date: Tue Apr 23 2024 - 13:30:12 EST


On Tue, Apr 23, 2024 at 04:30:43PM +0800, Dawei Li wrote:
> In general it's preferable to avoid placing cpumasks on the stack, as
> for large values of NR_CPUS these can consume significant amounts of
> stack space and make stack overflows more likely.
>
> Use cpumask_subset() and cpumask_first_and() to avoid the need for a
> temporary cpumask on the stack.
>
> Signed-off-by: Dawei Li <dawei.li@xxxxxxxxxxxx>
Looks fine.

Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx>