mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org
Cc: fengguang.wu@intel.com, Hugh Dickins <hugh.dickins@tiscali.co.uk>,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH] HWPOISON: fix oops on ksm pages
Date: Thu, 22 Oct 2009 08:02:29 +0200	[thread overview]
Message-ID: <1256191352-6903-6-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1256191352-6903-5-git-send-email-andi@firstfloor.org>

From: Hugh Dickins <hugh.dickins@tiscali.co.uk>

Memory failure on a KSM page currently oopses on its NULL anon_vma in
page_lock_anon_vma(): that may not be much worse than the consequence
of ignoring it, but it is better to be consistent with how ZERO_PAGE
and hugetlb pages and other awkward cases are treated.  Just skip it.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 mm/memory-failure.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index e17ec3f..e354b9f 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -35,6 +35,7 @@
 #include <linux/mm.h>
 #include <linux/page-flags.h>
 #include <linux/sched.h>
+#include <linux/ksm.h>
 #include <linux/rmap.h>
 #include <linux/pagemap.h>
 #include <linux/swap.h>
@@ -644,7 +645,7 @@ static void hwpoison_user_mappings(struct page *p, unsigned long pfn,
 	int i;
 	int kill = 1;
 
-	if (PageReserved(p) || PageCompound(p) || PageSlab(p))
+	if (PageReserved(p) || PageCompound(p) || PageSlab(p) || PageKsm(p))
 		return;
 
 	/*
-- 
1.6.0.2


  reply	other threads:[~2009-10-22  6:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <i>
2009-10-22  6:02 ` HWPOISON updates for 2.6.32-rc5 for review Andi Kleen
2009-10-22  6:02   ` [PATCH] HWPOISON: Clean up PR_MCE_KILL interface Andi Kleen
2009-10-22  6:02     ` [PATCH] HWPOISON: Add brief hwpoison description to Documentation Andi Kleen
2009-10-22  6:02       ` [PATCH] HWPOISON: return early on non-LRU pages Andi Kleen
2009-10-22  6:02         ` [PATCH] HWPOISON: Fix page count leak in hwpoison late kill in do_swap_page Andi Kleen
2009-10-22  6:02           ` Andi Kleen [this message]
2009-10-22  6:02             ` [PATCH] HWPOISON: fix/proc/meminfo alignment Andi Kleen
2009-10-22  6:02               ` [PATCH] HWPOISON: Allow schedule_on_each_cpu() from keventd Andi Kleen
2009-10-22  6:02                 ` [PATCH] HWPOISON: fix invalid page count in printk output Andi Kleen
2009-10-13 14:02 [PATCH] hwpoison: fix oops on ksm pages Hugh Dickins
2009-10-13 15:43 ` Andi Kleen
2009-10-13 18:03   ` Hugh Dickins

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=1256191352-6903-6-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome