x86/alternatives: Sync core before enabling interrupts
text_poke_early() does: local_irq_save(flags); memcpy(addr, opcode, len); local_irq_restore(flags); sync_core(); That's not really correct because the synchronization should happen before interrupts are reenabled to ensure that a pending interrupt observes the complete update of the opcodes. It's not entirely clear whether the interrupt entry provides enough serialization already, but moving the sync_core() invocation into interrupt disabled region does no harm and is obviously correct. Signed-off-by:Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com>
Loading
Please register or sign in to comment