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

Benjamin Herrenschmidt
2004-05-26T04:49:32Z

On Wed, 2004-05-26 at 14:50, Linus Torvalds wrote:
> On Wed, 26 May 2004, Benjamin Herrenschmidt wrote:
> >
> > Hrm... Still dies, some kind of loop it seems, I'll have a look
>
> Are you sure the it's not just taking infinite page fault because we keep
> reloading the old value from the hash tables? That "hash fault" thing
> still doesn't convince me. Why should the hash-refill fastpath ever look
> at the software page tables?

Where do you think the hash PTE is filled from ? :)

We even use one of the linux PTE bits as a lock bit during the hash
refill (the PAGE_BUSY bit) to avoid a race where we can end up filling
more than one hash entry from the same linux PTE.

Ben.