Possible race in x86 global_irq_lock handling.

From: TeJun Huh
Date: Thu Aug 21 2003 - 03:36:45 EST


I've been reading x86 interrupt handling code for a couple of days
and encountered something which I believe is a race condition. It's
betweewn include/asm-i386/hardirq.h:irq_enter() and
arch/i386/kernel/irq.c:get_irqlock(). Lockless synchronization using
memory ordering seems to be used to achieve global irq locking.

in get_irqlock()

static inline void irq_enter(int cpu, int irq)
{
++local_irq_count(cpu);

while (test_bit(0,&global_irq_lock)) {
cpu_relax();
}
}

-
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/