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@xxxxxxxxxx> --- 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>