Re: Possible race window when walking irq descriptors

From: Thomas Gleixner
Date: Fri Jun 05 2015 - 06:06:21 EST


On Fri, 5 Jun 2015, Jiang Liu wrote:
> 4) Called during cpu_up()
> kernel/irq/chip.c:irq_cpu_online()
> arch/x86/kernel/apic/vector.c:__setup_vector_irq()
>
> 5) Called from free running process context
> arch/x86/kernel/topology.c: arch_register_cpu()
> arch/x86/kernel/apic/io_apic.c: print_IO_APICs()
> kernel/irq/autoprobe.c: probe_irq_on()/probe_irq_mask()/probe_irq_off()
>
> 6) Called from free running interrupt context
> kernel/irq/spurious.c: poll_spurious_irqs()/misrouted_irq()
>
> So seems something needs to done to protect 4), 5) and 6). Is this
> analysis correct? If so, I will try to work out some patches for it.

Yes, you are right. We noticed that years ago and completely forgot
about it.

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/