|
@@ -2711,6 +2711,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))
|
|
if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
|
|
+ if (unlikely(PageHWPoison(vmf.page))) {
|
|
|
|
+ if (ret & VM_FAULT_LOCKED)
|
|
|
|
+ unlock_page(vmf.page);
|
|
|
|
+ return VM_FAULT_HWPOISON;
|
|
|
|
+ }
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* For consistency in subsequent calls, make the faulted page always
|
|
* For consistency in subsequent calls, make the faulted page always
|
|
* locked.
|
|
* locked.
|