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

From: Linus Torvalds
Date: Sun May 23 2004 - 23:38:03 EST




On Mon, 24 May 2004, Benjamin Herrenschmidt wrote:
>
> Typically, you can have a thread faulting on a page. It goes through hash_page,
> doesn't find the entry, and gets to do_page_fault(). However, just before it
> takes the mm sem, another thread actually mmap's that page in. Thus we end up
> in handle_pte_fault() with a present PTE which has a valid mapping already.

Ok, with you so far. But I don't see how you get to set_pte() that way,
since handle_pte_fault() will re-test the pte_present() bit, and never
even try to set_pte() if one already exists. Hmm?

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