Re: [PATCH] ppc64: Fix possible race with set_pte on a present PTE

From: David S. Miller
Date: Tue May 25 2004 - 16:00:51 EST


On Tue, 25 May 2004 13:49:57 -0700 (PDT)
Linus Torvalds <torvalds@xxxxxxxx> wrote:

> So it sounds like the SWAP loop basically ends up being just something
> like
...
> Right? Note that the reason we can do the "dirty and accessed bit both
> set" case with a simple write is exactly because that's already the
> "maximal" bits anybody can write to the thing, so we don't need to loop,
> we can just write it directly.

I believe so. So it's still possible for the mmu to write something
with less bits, ie. say we're adding dirty, we write dirty+accessed but the
TLB has the pre-dirty PTE and writes that with just the accessed bit set.

And this is exactly what you code is trying to handle. Perfect.
-
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/