[PATCH -alternative] mm: hugetlbfs: Close race during teardown ofhugetlbfs shared page tables V2 (resend)

From: Michal Hocko
Date: Fri Jul 20 2012 - 10:36:34 EST


And here is my attempt for the fix (Hugh mentioned something similar
earlier but he suggested using special flags in ptes or VMAs). I still
owe doc. update and it hasn't been tested with too many configs and I
could missed some definition updates.
I also think that changelog could be much better, I will add (steal) the
full bug description if people think that this way is worth going rather
than the one suggested by Mel.
To be honest I am not quite happy how I had to pollute generic mm code with
something that is specific to a single architecture.
Mel hammered it with the test case and it survived.
---