aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh.dickins@tiscali.co.uk>2009-10-13 10:02:11 -0400
committerAndi Kleen <ak@linux.intel.com>2009-10-19 01:29:20 -0400
commit01e00f880ca700376e1845cf7a2524ebe68e47d6 (patch)
tree6e15c363298dd01dd44d5c96afd9ef36078a1247 /mm/memory-failure.c
parent4779cb31c0ee3b355116745edca3f3e5fe865553 (diff)
HWPOISON: fix oops on ksm pages
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>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index e17ec3f1c637..e354b9f2f389 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -35,6 +35,7 @@
35#include <linux/mm.h> 35#include <linux/mm.h>
36#include <linux/page-flags.h> 36#include <linux/page-flags.h>
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <linux/ksm.h>
38#include <linux/rmap.h> 39#include <linux/rmap.h>
39#include <linux/pagemap.h> 40#include <linux/pagemap.h>
40#include <linux/swap.h> 41#include <linux/swap.h>
@@ -644,7 +645,7 @@ static void hwpoison_user_mappings(struct page *p, unsigned long pfn,
644 int i; 645 int i;
645 int kill = 1; 646 int kill = 1;
646 647
647 if (PageReserved(p) || PageCompound(p) || PageSlab(p)) 648 if (PageReserved(p) || PageCompound(p) || PageSlab(p) || PageKsm(p))
648 return; 649 return;
649 650
650 /* 651 /*