x86: fix irq_lock/unlock ordering bug

Memory accesses could be reordered before an irq_lock() or after an
irq_unlock() without the memory barriers.

See commit 15bc537712 for the ARM fix for
a complete description of the issue and fix.

Change-Id: Ic92a6b33f62a938d2252d68eccc55a5fb07c9114
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-12-02 12:18:39 -05:00 committed by Kumar Gala
commit 1f8125a416

View file

@ -82,7 +82,7 @@ static ALWAYS_INLINE void _do_irq_unlock(void)
{
__asm__ volatile (
"sti;\n\t"
: :
: : : "memory"
);
}