Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-06-10 11:34:10 +0200
committerJan Kara <jack@suse.cz>2019-06-10 11:34:10 +0200
commit38f4efcfa3ea6911c5881ca6c326fed1f8a46c54 (patch)
tree411c2f085c7e9e492745e302392bf0dde0b7ef0e
parent4dd08fd5a07f66a571bf194d3c5abf2230a4dc45 (diff)
patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch:
Fix buggy backport leading to MAP_SYNC failures (bsc#1137372)
-rw-r--r--patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch14
1 files changed, 5 insertions, 9 deletions
diff --git a/patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch b/patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch
index 9bfd6bf5db..389d11cee6 100644
--- a/patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch
+++ b/patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch
@@ -37,14 +37,12 @@ Reported-by: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Jan Kara <jack@suse.cz>
---
- mm/memory.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
+ mm/memory.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
-diff --git a/mm/memory.c b/mm/memory.c
-index 47fe250307c7..ab650c21bccd 100644
--- a/mm/memory.c
+++ b/mm/memory.c
-@@ -1549,10 +1549,12 @@ static vm_fault_t insert_pfn(struct vm_area_struct *vma, unsigned long addr,
+@@ -1799,10 +1799,13 @@ static int insert_pfn(struct vm_area_str
WARN_ON_ONCE(!is_zero_pfn(pte_pfn(*pte)));
goto out_unlock;
}
@@ -56,12 +54,13 @@ index 47fe250307c7..ab650c21bccd 100644
+ entry = maybe_mkwrite(pte_mkdirty(entry), vma);
+ if (ptep_set_access_flags(vma, addr, pte, entry, 1))
+ update_mmu_cache(vma, addr, pte);
++ retval = 0;
+ }
+ goto out_unlock;
}
/* Ok, finally just insert the thing.. */
-@@ -1561,7 +1563,6 @@ static vm_fault_t insert_pfn(struct vm_area_struct *vma, unsigned long addr,
+@@ -1811,7 +1814,6 @@ static int insert_pfn(struct vm_area_str
else
entry = pte_mkspecial(pfn_t_pte(pfn, prot));
@@ -69,6 +68,3 @@ index 47fe250307c7..ab650c21bccd 100644
if (mkwrite) {
entry = pte_mkyoung(entry);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
---
-2.16.4
-