On 13.06.2024 18:56, Roger Pau Monne wrote: > Given the current logic it's possible for ->arch.old_cpu_mask to get out of > sync: if a CPU set in old_cpu_mask is offlined and then onlined > again without old_cpu_mask having been updated the data in the mask will no > longer be accurate, as when brought back online the CPU will no longer have > old_vector configured to handle the old interrupt source. > > If there's an interrupt movement in progress, and the to be offlined CPU > (which > is the call context) is in the old_cpu_mask clear it and update the mask, so > it > doesn't contain stale data.
Perhaps a comma before "clear" might further help reading. Happy to add while committing. > Note that when the system is going down fixup_irqs() will be called by > smp_send_stop() from CPU 0 with a mask with only CPU 0 on it, effectively > asking to move all interrupts to the current caller (CPU 0) which is the only > CPU to remain online. In that case we don't care to migrate interrupts that > are in the process of being moved, as it's likely we won't be able to move all > interrupts to CPU 0 due to vector shortage anyway. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> Reviewed-by: Jan Beulich <jbeul...@suse.com>