Re: SMP race in page IO list

Patrik Rak (patrik@ein.cz)
Mon, 19 Apr 1999 08:39:07 +0200 (CEST)


On Sat, 17 Apr 1999, Ingo Molnar wrote:

>
> On Sat, 17 Apr 1999, Patrik Rak wrote:
>
> > I think that there is a SMP race in the put_pio_request() and
> > get_pio_request() in mm/filemap.c. The PIO list may get corrupted if
> > several processors access it at once.
> >
> > May be someone might like to add a spinlock there (or tell me that there
> > is no race because of <some smart explanation here>).
>
> it's protected by the kernel lock [just watch how kpiod does an initial
> lock_kernel()] ... or can you see any code path which uses

Sure I noticed that.

> get_pio_request() without acquiring the kernel lock?

Of course not (only kpiod calls this).

But I was thinking about concurrent put_pio_requests (each on different
CPU) and put_pio_request vs get_pio_request (also on different CPUs).
Obviously, if all put_pio_requests are also protected by
kernel lock, things work fine, but is this really true? That's my
question...

Patrik

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