possible SMP-race, 2.2.9 & 2.3.3

Manfred Spraul (manfreds@colorfullife.com)
Wed, 19 May 1999 13:05:34 +0200


__global_cli() cannot stop the other processors if it is called with
interrupts disabled.

arch/i386/kernel/irq.c:
> A global "cli()" while in an interrupts context turns
> into just a local cli(). Interrupts should use a spinlock
> for the (very unlikely) case they ever want to protect
> against each other.

I've added a check for that event (__global_cli() called with IF
cleared), and this happens often.
Do we have to fix that? (i.e. convert the callers from __global_cli() to
a spinlock?)

I've found one codpath:
-> ide_end_request(): acquires io_request_lock, clear local interrupts.
-> calls end_that_request_first()
-> calls end_buffer_io_async() <<<<<<<<<< calls cli(), needs global
sync.

Regards,
Manfred

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