Merge 5.4-rc1-prereleae into android-mainline
To make the 5.4-rc1 merge easier, merge at a prerelease point in time before the final release happens. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I29b683c837ed1a3324644dbf9bf863f30740cd0b
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* (C) Copyright 2002 Red Hat Inc, All Rights Reserved
|
||||
*/
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/pagewalk.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/shm.h>
|
||||
#include <linux/mman.h>
|
||||
@@ -329,20 +329,11 @@ static int prot_none_test(unsigned long addr, unsigned long next,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int prot_none_walk(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end, unsigned long newflags)
|
||||
{
|
||||
pgprot_t new_pgprot = vm_get_page_prot(newflags);
|
||||
struct mm_walk prot_none_walk = {
|
||||
.pte_entry = prot_none_pte_entry,
|
||||
.hugetlb_entry = prot_none_hugetlb_entry,
|
||||
.test_walk = prot_none_test,
|
||||
.mm = current->mm,
|
||||
.private = &new_pgprot,
|
||||
};
|
||||
|
||||
return walk_page_range(start, end, &prot_none_walk);
|
||||
}
|
||||
static const struct mm_walk_ops prot_none_walk_ops = {
|
||||
.pte_entry = prot_none_pte_entry,
|
||||
.hugetlb_entry = prot_none_hugetlb_entry,
|
||||
.test_walk = prot_none_test,
|
||||
};
|
||||
|
||||
int
|
||||
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
|
||||
@@ -369,7 +360,10 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
|
||||
if (arch_has_pfn_modify_check() &&
|
||||
(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) &&
|
||||
(newflags & (VM_READ|VM_WRITE|VM_EXEC)) == 0) {
|
||||
error = prot_none_walk(vma, start, end, newflags);
|
||||
pgprot_t new_pgprot = vm_get_page_prot(newflags);
|
||||
|
||||
error = walk_page_range(current->mm, start, end,
|
||||
&prot_none_walk_ops, &new_pgprot);
|
||||
if (error)
|
||||
return error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user