summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-12-16 12:20:01 +0100
committerAndi Kleen <ak@linux.intel.com>2009-12-16 12:20:01 +0100
commit0d57eb8dfcb92e3dd928d792f4ed2b2fec680bb7 (patch)
tree2aaf6d64134d380b3f17efd3aebb09d453f09e1d /mm
parentafcf938ee0aac4ef95b1a23bac704c6fbeb26de6 (diff)
downloadop-kernel-dev-0d57eb8dfcb92e3dd928d792f4ed2b2fec680bb7.zip
op-kernel-dev-0d57eb8dfcb92e3dd928d792f4ed2b2fec680bb7.tar.gz
HWPOISON: Don't do early filtering if filter is disabled
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/hwpoison-inject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c
index a77fe3f..10ea719 100644
--- a/mm/hwpoison-inject.c
+++ b/mm/hwpoison-inject.c
@@ -18,6 +18,8 @@ static int hwpoison_inject(void *data, u64 val)
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, u64 val)
if (err)
return 0;
+inject:
printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn);
return __memory_failure(pfn, 18, MF_COUNT_INCREASED);
}
OpenPOWER on IntegriCloud