On Fri, 2010-04-09 at 14:07 +1000, Nick Piggin wrote:
We must flush before the pte_lock is released. If not, we end up with
this funny situation:
- PTE is read-only, hash contains a translation for it
- PTE gets cleared & added to the batch, hash not flushed yet
- PTE lock released, maybe even VMA fully removed
- Other CPU takes a write fault, puts in a new PTE
- Hash ends up with duplicates of the vaddr -> arch violation
Now we could get out of that one, I suppose, if we had some kind of way
to force flush any batch pertaining to a given mm before a new valid PTE
can be written, but that doesn't sound such a trivial thing to do.
Any better idea ?
Cheers,
Ben.
--