Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- mm/memory.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
+ mm/memory.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
--- a/mm/memory.c
+++ b/mm/memory.c
-@@ -3237,6 +3237,28 @@ static vm_fault_t __do_fault(struct vm_f
+@@ -3237,6 +3237,29 @@ static vm_fault_t __do_fault(struct vm_f
struct vm_area_struct *vma = vmf->vma;
vm_fault_t ret;
+ * # flush A, B to clear the writeback
+ */
+ if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
-+ vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm);
++ vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm,
++ vmf->address);
+ if (!vmf->prealloc_pte)
+ return VM_FAULT_OOM;
+ smp_wmb(); /* See comment in __pte_alloc() */
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- mm/memory.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
+ mm/memory.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
--- a/mm/memory.c
+++ b/mm/memory.c
-@@ -2993,6 +2993,28 @@ static vm_fault_t __do_fault(struct vm_f
+@@ -2993,6 +2993,29 @@ static vm_fault_t __do_fault(struct vm_f
struct vm_area_struct *vma = vmf->vma;
vm_fault_t ret;
+ * # flush A, B to clear the writeback
+ */
+ if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
-+ vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm);
++ vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm,
++ vmf->address);
+ if (!vmf->prealloc_pte)
+ return VM_FAULT_OOM;
+ smp_wmb(); /* See comment in __pte_alloc() */