aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 02bae2d540d4..44ea41196c13 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2711,6 +2711,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2711 if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) 2711 if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))
2712 return ret; 2712 return ret;
2713 2713
2714 if (unlikely(PageHWPoison(vmf.page))) {
2715 if (ret & VM_FAULT_LOCKED)
2716 unlock_page(vmf.page);
2717 return VM_FAULT_HWPOISON;
2718 }
2719
2714 /* 2720 /*
2715 * For consistency in subsequent calls, make the faulted page always 2721 * For consistency in subsequent calls, make the faulted page always
2716 * locked. 2722 * locked.