diff options
author | Marc Zyngier <maz@kernel.org> | 2020-09-25 16:22:00 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-09-28 11:32:04 +0100 |
commit | 220387048d859896ccc362c0ebf9bc1e0fa62eb9 (patch) | |
tree | 4f6cf0bef67313ec278bd38b0829f302209d7dbc /arch/arm/kernel/smp.c | |
parent | ac15a54e03d13686d2fc016a88311801b0734046 (diff) |
ARM: Handle no IPI being registered in show_ipi_list()
As SMP-on-UP is a valid configuration on 32bit ARM, do not assume that
IPIs are populated in show_ipi_list().
Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Reported-by: kernelci.org bot <bot@kernelci.org>
Tested-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8425da517984..48099c6e1e4a 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -541,7 +541,12 @@ void show_ipi_list(struct seq_file *p, int prec) unsigned int cpu, i; for (i = 0; i < NR_IPI; i++) { - unsigned int irq = irq_desc_get_irq(ipi_desc[i]); + unsigned int irq; + + if (!ipi_desc[i]) + continue; + + irq = irq_desc_get_irq(ipi_desc[i]); seq_printf(p, "%*s%u: ", prec - 1, "IPI", i); for_each_online_cpu(cpu) |