On Thu, 2008-05-08 at 18:19 +0200, Hans Rosenfeld wrote:
I can't see how it would possibly work with the code that we have today,
so I guess it was just a false assumption.
static inline int pmd_none_or_clear_bad(pmd_t *pmd)
{
if (pmd_none(*pmd))
return 1;
if (unlikely(pmd_bad(*pmd))) {
pmd_clear_bad(pmd);
return 1;
}
return 0;
}
void pmd_clear_bad(pmd_t *pmd)
{
pmd_ERROR(*pmd);
pmd_clear(pmd);
}
That pmd_clear() will simply zero out the pmd and leak the page.
Sounds like Linus had the right idea:
-- Dave
--