projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afcf938
)
HWPOISON: Don't do early filtering if filter is disabled
author
Andi Kleen
<andi@firstfloor.org>
Wed, 16 Dec 2009 11:20:01 +0000
(12:20 +0100)
committer
Andi Kleen
<ak@linux.intel.com>
Wed, 16 Dec 2009 11:20:01 +0000
(12:20 +0100)
Signed-off-by: Andi Kleen <ak@linux.intel.com>
mm/hwpoison-inject.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/hwpoison-inject.c
b/mm/hwpoison-inject.c
index a77fe3f9e211420adc7fda89ab098508aa8a99b2..10ea71905c1fbbb8a9582737e05f78fefa86012e 100644
(file)
--- 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);
}