lkml.org 
[lkml]   [2009]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [25/31] HWPOISON: Don't do early filtering if filter is disabled
Date

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
mm/hwpoison-inject.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux/mm/hwpoison-inject.c
===================================================================
--- linux.orig/mm/hwpoison-inject.c
+++ linux/mm/hwpoison-inject.c
@@ -18,6 +18,8 @@ static int hwpoison_inject(void *data, u
if (!capable(CAP_SYS_ADMIN))
return -EPERM;

+ if (!hwpoison_filter_enable)
+ goto inject;
if (!pfn_valid(pfn))
return -ENXIO;

@@ -48,6 +50,7 @@ static int hwpoison_inject(void *data, u
if (err)
return 0;

+inject:
printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn);
return __memory_failure(pfn, 18, MF_COUNT_INCREASED);
}

\
 
 \ /
  Last update: 2009-12-08 22:23    [W:0.278 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site