diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 10:59:55 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 10:59:55 -0500 |
commit | 02f693c7118f6be9e677070eb630c1f3a654cdd3 (patch) | |
tree | b5493c816a1f76a01319a84955c5ba07d47517c3 /drivers/video/sbuslib.c | |
parent | e7fb585940a3dc87a42ebc30a62296e5cf6f9cd5 (diff) | |
parent | a18ceba7b40e24a9da87249bd74f16ea5abd6894 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers/video/sbuslib.c')
-rw-r--r-- | drivers/video/sbuslib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 646c43f921c5..3a74a63dd4f2 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
@@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, | |||
46 | unsigned long off; | 46 | unsigned long off; |
47 | int i; | 47 | int i; |
48 | 48 | ||
49 | if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) | ||
50 | return -EINVAL; | ||
51 | |||
49 | size = vma->vm_end - vma->vm_start; | 52 | size = vma->vm_end - vma->vm_start; |
50 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) | 53 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) |
51 | return -EINVAL; | 54 | return -EINVAL; |