* [PATCH] powerpc/mm: Handle hypervisor pte insert failure in __hash_page_huge
@ 2010-07-15 5:31 Anton Blanchard
0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2010-07-15 5:31 UTC (permalink / raw)
To: benh, dwg; +Cc: linuxppc-dev
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>
---
Index: powerpc.git/arch/powerpc/mm/hugetlbpage-hash64.c
===================================================================
--- powerpc.git.orig/arch/powerpc/mm/hugetlbpage-hash64.c 2010-07-15 15:24:19.520742137 +1000
+++ powerpc.git/arch/powerpc/mm/hugetlbpage-hash64.c 2010-07-15 15:24:30.343243050 +1000
@@ -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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-15 5:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15 5:31 [PATCH] powerpc/mm: Handle hypervisor pte insert failure in __hash_page_huge Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).