aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-11-22 00:32:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-22 12:13:41 -0500
commited5297a94090d9a9f27b0ce1f9601ebe73561cff (patch)
tree00d28144ae949b3f9d566279cb12be0c802f86e6 /mm
parentaa1a64ee12ae130706f3fc0007841ce9b0ddf9c2 (diff)
[PATCH] unpaged: get_user_pages VM_RESERVED
The PageReserved removal in 2.6.15-rc1 prohibited get_user_pages on the areas flagged VM_RESERVED in place of PageReserved. That is correct in theory - we ought not to interfere with struct pages in such a reserved area; but in practice it broke BTTV for one. So revert to prohibiting only on VM_IO: if someone gets into trouble with get_user_pages on VM_RESERVED, it'll just be a "don't do that". You can argue that videobuf_mmap_mapper shouldn't set VM_RESERVED in the first place, but now's not the time for breaking drivers without notice. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 2998cfc12f5b..cfce5f1f30f2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -968,7 +968,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
968 continue; 968 continue;
969 } 969 }
970 970
971 if (!vma || (vma->vm_flags & (VM_IO | VM_RESERVED)) 971 if (!vma || (vma->vm_flags & VM_IO)
972 || !(vm_flags & vma->vm_flags)) 972 || !(vm_flags & vma->vm_flags))
973 return i ? : -EFAULT; 973 return i ? : -EFAULT;
974 974