]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Fix bugs in huge page hashing
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 22 Jul 2010 23:02:27 +0000 (09:02 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 23 Jul 2010 02:55:21 +0000 (12:55 +1000)
commit16c61c9638f339df1fa4f387bef00df5d5b5b51a
treefcaff760d9771e932fbfe831a3fc1ce4dc0bce00
parent534e47078edad3d1b34a6fd1dc59cd35e126b450
powerpc/mm: Fix bugs in huge page hashing

There's a couple of nasty bugs lurking in our huge page hashing code.

First, we don't check the access permission atomically with setting
the _PAGE_BUSY bit, which means that the PTE value we end up using
for the hashing might be different than the one we have checked
the access permissions for.

We've seen cases where that leads us to try to use an invalidated
PTE for hashing, causing all sort of "interesting" issues.

Then, we also failed to set _PAGE_DIRTY on a write access.

Finally, a minor tweak but we should return 0 when we find the
PTE busy, in order to just re-execute the access, rather than 1
which means going to do_page_fault().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/mm/hugetlbpage-hash64.c