Re: [PATCH][2.6-mm] i386: enable interrupts on contention inspin_lock_irq

From: Zwane Mwaikambo
Date: Wed May 26 2004 - 02:49:09 EST


On Wed, 26 May 2004, Keith Owens wrote:

> Your patch opens a window where data that was protected by the disabled
> interrupt on entry becomes unprotected while waiting for the lock and
> can therefore change.
>
> It could be that I am worrying unnecessarily, after all any code that
> calls spin_lock_irq() with interrupts already disabled is probably
> wrong to start off with. But it does need to be considered as a
> possible failure mode.

Granted there might be code like that, i'll throw in some debugging code
locally to test for such a condition. It wouldn't necessarily be a bug but
a very uncool way of obfuscating the locking.

Thanks,
Zwane

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