[PATCH] unpaged: private write VM_RESERVED
commit83e9b7e929d1323b9a155d186f77aa8c06155cc3
authorHugh Dickins <hugh@veritas.com>
Tue, 22 Nov 2005 05:32:12 +0000 (21 21:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 22 Nov 2005 17:13:42 +0000 (22 09:13 -0800)
tree3cad39e867ca337b08bc4a7309c2b17787abd527
parented5297a94090d9a9f27b0ce1f9601ebe73561cff
[PATCH] unpaged: private write VM_RESERVED

The PageReserved removal in 2.6.15-rc1 issued a "deprecated" message when you
tried to mmap or mprotect MAP_PRIVATE PROT_WRITE a VM_RESERVED, and failed
with -EACCES: because do_wp_page lacks the refinement to COW pages in those
areas, nor do we expect to find anonymous pages in them; and it seemed just
bloat to add code for handling such a peculiar case.  But immediately it
caused vbetool and ddcprobe (using lrmi) to fail.

So revert the "deprecated" messages, letting mmap and mprotect succeed.  But
leave do_wp_page's BUG_ON(vma->vm_flags & VM_RESERVED) in place until we've
added the code to do it right: so this particular patch is only good if the
app doesn't really need to write to that private area.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/mmap.c
mm/mprotect.c