Re: [PATCH Dovetail 6.18 2/3] arm64: irq_pipeline: Fix size of IPI statistics array

Philippe Gerum
2026-02-03T11:59:44Z

Florian Bezdeka <florian.bezdeka@siemens.com> writes:

> NR_IPI is not the last possible IPI, it's the last traceable IPI.
> IPI_CPU_BACKTRACE and IPI_KGDB_ROUNDUP are located behind NR_IPI,
> so access to those counters were out of bounds.
>
> Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
> ---
> arch/arm64/kernel/smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index e8cee27dc1132..716ba0b0c274b 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -1049,7 +1049,7 @@ static void __smp_cross_call(const struct cpumask *target, unsigned int ipinr)
>
> static DEFINE_PER_CPU(unsigned long, ipi_messages);
>
> -static DEFINE_PER_CPU(unsigned int [NR_IPI], ipi_counts);
> +static DEFINE_PER_CPU(unsigned int [MAX_IPI], ipi_counts);
>
> static irqreturn_t ipi_handler(int irq, void *data)
> {

Good catch, ack.

--
Philippe.