From: Anton Blanchard <anton@samba.org>
To: benh@kernel.crashing.org, dwg@au1.ibm.com
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc/mm: Handle hypervisor pte insert failure in __hash_page_huge
Date: Thu, 15 Jul 2010 15:31:48 +1000 [thread overview]
Message-ID: <20100715053148.GD10155@kryten> (raw)
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);
}
reply other threads:[~2010-07-15 5:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100715053148.GD10155@kryten \
--to=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=dwg@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).