[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1408831921-10168-3-git-send-email-pfeiner@google.com>
Date: Sat, 23 Aug 2014 18:12:00 -0400
From: Peter Feiner <pfeiner@...gle.com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, Peter Feiner <pfeiner@...gle.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
Pavel Emelyanov <xemul@...allels.com>,
Jamie Liu <jamieliu@...gle.com>,
Hugh Dickins <hughd@...gle.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH v2 2/3] mm: mprotect: preserve special page protection bits
We don't want to zap special page protection bits on mprotect.
Analogous to the bug fixed in c9d0bf241451a3ab7d02e1652c22b80cd7d93e8f
where vm_page_prot bits set by drivers were zapped when write
notifications were enabled on new VMAs.
Signed-off-by: Peter Feiner <pfeiner@...gle.com>
---
mm/mprotect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mprotect.c b/mm/mprotect.c
index c43d557..1c1afd4 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -324,7 +324,7 @@ success:
vm_get_page_prot(newflags));
if (vma_wants_writenotify(vma)) {
- vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
+ vma_enable_writenotify(vma);
dirty_accountable = 1;
}
--
2.1.0.rc2.206.gedb03e5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists