diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 19:24:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 19:24:33 -0500 |
commit | 1ff8038988adecfde71d82c0597727fc239d4e8c (patch) | |
tree | a592cbfad237a5e373724918a0cc17ee9c421237 | |
parent | 14ee0a1414536d27bc29373bf23c106b8ef8ce0b (diff) |
get_user_pages: don't try to follow PFNMAP pages
Nick Piggin points out that a few drivers play games with VM_IO (why?
who knows..) and thus a pfn-remapped area may not have that bit set even
if remap_pfn_range() set it originally.
So make it explicit in get_user_pages() that we don't follow VM_PFNMAP
pages, since pretty much by definition they do not have a "struct page"
associated with them.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index 47c533eaa072..d22f78c8a381 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1009,7 +1009,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
1009 | continue; | 1009 | continue; |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | if (!vma || (vma->vm_flags & VM_IO) | 1012 | if (!vma || (vma->vm_flags & (VM_IO | VM_PFNMAP)) |
1013 | || !(vm_flags & vma->vm_flags)) | 1013 | || !(vm_flags & vma->vm_flags)) |
1014 | return i ? : -EFAULT; | 1014 | return i ? : -EFAULT; |
1015 | 1015 | ||