Re: [rfc] "fair" rw spinlocks

Paul E. McKenney
2009-11-30T18:29:27Z

On Mon, Nov 30, 2009 at 06:13:33PM +0100, Nick Piggin wrote:
> On Mon, Nov 30, 2009 at 09:05:57AM -0800, Linus Torvalds wrote:
> Secondly:
>
> > static void tasklist_read_lock(void)
> > {
> > preempt_disable();
> > if (!current->tasklist_count++)
>
> What happens if an interrupt and nested tasklist_read_lock() happens
> here?

Ouch!!! This race affects the reader-writer-lock version as well.
Ah well, looks like interrupt disabling is required either way.

Thanx, Paul