aboutsummaryrefslogtreecommitdiffstats
path: root/mm/madvise.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-12-16 06:19:57 -0500
committerAndi Kleen <ak@linux.intel.com>2009-12-16 06:19:57 -0500
commitbd1ce5f91f545730df4af492f774d9d32f5da3cb (patch)
tree7d25f35cda1f37e30fd21bb2375f2693837d5ec5 /mm/madvise.c
parenta7560fc80f33cab33176ee78f146df22b28e3338 (diff)
HWPOISON: avoid grabbing the page count multiple times during madvise injection
If page is double referenced in madvise_hwpoison() and __memory_failure(), remove_mapping() will fail because it expects page_count=2. Fix it by not grabbing extra page count in __memory_failure(). Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm/madvise.c')
-rw-r--r--mm/madvise.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/madvise.c b/mm/madvise.c
index 35b1479b7c9d..18970aec0d2f 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -238,7 +238,6 @@ static int madvise_hwpoison(unsigned long start, unsigned long end)
238 page_to_pfn(p), start); 238 page_to_pfn(p), start);
239 /* Ignore return value for now */ 239 /* Ignore return value for now */
240 __memory_failure(page_to_pfn(p), 0, 1); 240 __memory_failure(page_to_pfn(p), 0, 1);
241 put_page(p);
242 } 241 }
243 return ret; 242 return ret;
244} 243}