diff options
author | Anton Blanchard <anton@samba.org> | 2010-07-14 19:31:48 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-23 08:44:51 +1000 |
commit | b1623e7eb280f853f60338c7bb68bd3f3a970205 (patch) | |
tree | 86b0a532dd3cdd8228f6efbd3067d7b693eb159c /arch/powerpc | |
parent | b37fa16e78d6f9790462b3181602a26b5af36260 (diff) | |
download | op-kernel-dev-b1623e7eb280f853f60338c7bb68bd3f3a970205.zip op-kernel-dev-b1623e7eb280f853f60338c7bb68bd3f3a970205.tar.gz |
powerpc/mm: Handle hypervisor pte insert failure in __hash_page_huge
If the hypervisor gives us an error on a hugepage insert we panic. The
normal page code already handles this by returning an error instead and we end
calling low_hash_fault which will just kill the task if possible.
The patch below does a similar thing for the hugepage case.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage-hash64.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/hugetlbpage-hash64.c index 1995398..c9acd79 100644 --- a/arch/powerpc/mm/hugetlbpage-hash64.c +++ b/arch/powerpc/mm/hugetlbpage-hash64.c @@ -121,8 +121,15 @@ repeat: } } - if (unlikely(slot == -2)) - panic("hash_huge_page: pte_insert failed\n"); + /* + * Hypervisor failure. Restore old pte and return -1 + * similar to __hash_page_* + */ + if (unlikely(slot == -2)) { + *ptep = __pte(old_pte); + err = -1; + goto out; + } new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX); } |